diff -r eef994887c13 -r 52286691aad5 Integer.st --- a/Integer.st Tue Feb 18 14:36:18 2014 +0100 +++ b/Integer.st Tue Feb 18 14:41:40 2014 +0100 @@ -2110,6 +2110,23 @@ " ! +leftShift:shiftCount + "return the value of the receiver shifted left by shiftCount bits; + leftShift if shiftCount > 0; rightShift otherwise. + + Notice: the result of bitShift: on negative receivers is not + defined in the language standard (since the implementation + is free to choose any internal representation for integers) + However, ST/X preserves the sign." + + ^ self bitShift:shiftCount + + " + 16r100000000 leftShift:1 + 16r100000000 negated leftShift:1 + " +! + lowBit "return the bitIndex of the lowest bit set. The returned bitIndex starts at 1 for the least significant bit. @@ -5042,11 +5059,11 @@ !Integer class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.295 2014-02-14 16:23:00 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.296 2014-02-18 13:41:40 cg Exp $' ! version_CVS - ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.295 2014-02-14 16:23:00 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/Integer.st,v 1.296 2014-02-18 13:41:40 cg Exp $' ! !