Bitwise operations and md4digest function

Alex Tweedly alex at tweedly.net
Wed Nov 23 18:26:32 EST 2005


Sean Shao wrote:

> Alejandro, if you are using Rev 2.5.x or lower, Rev can't do any math 
> with numbers larger than 0xFFFFFFF (7 F's) Rev 2.6 and greater can (I 
> don't know the limits as I only needed 0xFFFFFFFF (8 F's))  I'm having 
> similiar problems with bit math and am looking at rolling my own..
>
It can do some arithmetic above 0xFFFFFFF (7 Fs)

For instance, in 2.5 and 2.2.1 I can do

 put format("%x", 2^31 + 5)     ---->   80000005
(i.e. it has successfully taken an addition into the range above INT32)

or even
   put format("%08x %u", 2^32 / 2^30, 2^32 / 2^30)   --->  00000004  4

I'd be interested to hear what things you had trouble with ...

-- 
Alex Tweedly       http://www.tweedly.net



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.4/176 - Release Date: 20/11/2005




More information about the use-livecode mailing list