joraboy328
25th September 2010, 13:27
Code as below:

string longs(8)
longs="12345678"

long long_high, long_low
long_high = load.long(longs(1;4))
long_low = load.long(longs(5;4))

message("%d:%d",long_low,long_high)

I try to run it on BaaNIVC4 and get result is:892745528:825373492
It's very strange results,Why?What is the correct result?
How to use this function?would anyone give me the sample code?thank you!

Marnix Klooster
25th September 2010, 14:57
This function should only be used together with store.long(). store.long(42, str) stores the long, in some binary platform-independent format, in the first 4 bytes of a (non-mb!) string. load.long(str) is then used to read a long back from such a string.