"David" == David Finlayson dfinlayson@usgs.gov writes:
David> ((((a notNil and: [ b notNil ]) and: [ c notNil ])) and: [ d notNil]) David> ifTrue: David> [ n := a. David> n := (n bitShift: 8) + b. David> n := (n bitShift: 8) + c. David> n := (n bitShift: 8) + d ] David> ifFalse: [ n := nil ].
This screams for an "early answer" assistant method, something like:
computeSomething a isNil: [^nil]. b isNil: [^nil]. c isNil: [^nil]. d isNil: [^nil]. ^(the code with all the bitshifts).
Actually, perhaps even the use of a good detect: would be right here, if you didn't have a, b, c, d as instvars. In fact, that's much more likely an array instead of four instvars, which would simplify all the repeated code.