SmallInteger and machine word size
Igor Stasenko
siguctua at gmail.com
Tue Feb 19 13:13:09 UTC 2008
Hello,
I want to use integer values to pass them over a binary data stream.
And for this i need to encode a smallinteger value into bytearray
(endianess not matters).
Is there any way how to do it in platform independent way?
Lets say, if we have a SmallInteger>>asByteArray
then it should return an array of 4 bytes on 32 bit architecture and 8
bytes on 64 bits.
Or maybe, as variant, can i convert somehow Smallinteger to Big one,
without make it auto-converted back to SmallInteger?
--
Best regards,
Igor Stasenko AKA sig.
More information about the Squeak-dev
mailing list
|