baseConvert() & 32-bit ops (was Best array population & access optimization)
Dar Scott
dsc at swcp.com
Sat Jun 21 15:11:00 EDT 2003
On Saturday, June 21, 2003, at 01:47 PM, Dar Scott wrote:
>> also, not being familiar with binaryEncode how would you write the
>> following using binaryEncode?
>>
>> put charToNum("F") + (charToNum("o") * 256 ) + ( charToNum("r") *
>> 65536 ) + ( charToNum("m") * 16777216 ) into xL
>
> local halfBlock -- required
> put binaryDecode("N","Form",halfBlock) into numConverted
>
> In converting strings to blocks use 'char i to (i+3) of plainText'
> instead of "Form" and pay attention to the end. The variable
> numConverted with be 0 for short data.
Whoops. I got the bytes backwards. Can you live with my order?
put binaryDecode("N", "m" & "r" & "o" & "F" ,halfBlock) into
numConverted
Dar Scott
More information about the use-livecode
mailing list