[Prev][Next][Index][Thread]

unsigned long (4 bytes) in mindy





Does anyone know if there is any way to represent an unsigned 4 byte integer
in mindy/dylan?

I'm doing some mindy wrapper code for the Macintosh Toolbox and need some
way of getting the four byte codes that would be written in a Mac C or
Pascal compiler as 'abcd' into the function call to the toolbox without
mindy converting it to a signed integer.

Using an explicitly created pointer and packing it in manually with:

for (i from 0 below 4)
    unsigned-byte-at(my-pointer, offset: i) := as(<integer>, in-string[i]);
end for;

and then accessing the value using unsigned-long-at(my-pointer) does not
seem to work.

Many thanks
Gareth Baker
G.J.Baker@dl.ac.uk