Binary "Shift Left" operator?
Colin Holgate
coiin at rcn.com
Wed Apr 30 11:08:30 EDT 2008
At 3:58 PM +0100 4/30/08, Mark Smith wrote:
>function shiftLeft pNum, pSteps
> if pNum = 0 then return 0
> if pSteps is empty then put 1 into pSteps
> put pNum * (2 ^ pSteps) into tShiftedNum
> if tShiftedNum > 2 ^ 32 then subtract 2 ^ 32 from tShiftedNum
> return tShiftedNum
>end shiftLeft
Did you read my other message, where I suggested that doing a mod
would solve the same issue?
More information about the use-livecode
mailing list