Login  Register

Can it do this way ?

Posted by Pharo Smalltalk Users mailing list on Sep 02, 2020; 6:18am
URL: https://forum.world.st/Can-it-do-this-way-tp5121193.html

Hello,

I have now a challenge where I have to validate a ISBN number.

Can I do something like this on the class side :

(string isEmpty)
    ifTrrue: [ ^ false]
   ifFalse:  [ digits:= something.
                    controlDigit := something.
                    self validateISBNNumber]

where on the validateISBNNumber I use the instance variables digits and
controlDigit to validate the ISBN number on the instance side.

Roelof