Byte order and ByteArray conversions [SUMMARY]
Pennell, David
dpennell at quallaby.com
Wed Nov 3 18:11:46 UTC 1999
If you expect to use isLittleEndian a lot, it might be worthwhile to
compute this during image startup and cache the results in a class variable.
Look for selectors containing "startUp" for examples of how to run code
at image startup.
-david
[snip]
> isLittleEndian
> "Answer true if the machine on which we are executing uses little
> endian byte order conventions."
>
> ^ ((ReadStream on: (ByteArray newFrom: #(0 0 4 210)))
> nextNumber: 4) == 1234
[snip]
More information about the Squeak-dev
mailing list
|