Re: Bytes into integer
Re: Bytes into integer
- Subject: Re: Bytes into integer
- From: Doug McNutt <email@hidden>
- Date: Fri, 13 Feb 2004 07:07:17 -0700
At 08:31 -0500 2/13/04, Steve Roy wrote:
>
int off = (b1 << 16) + (b2 << 8) + (b3 << 0);
>
>
But I don't know any way in vanilla AppleScript to do bitwise operation like the
>
Java code does. Is there a clever trick to do this?
= b1 * 2^16 + b2 * 2^8 + b3
= ((b1 * 256) + b2) * 256 + b3
But does AppleScript use unsigned chars? Or will bytes > 127 be treated as negative values?
--
--> There are 10 kinds of people: those who understand binary, and those who don't <--
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.