wbaxter at gmail.com
Fri Nov 17 05:31:39 PST 2006
Boris Shomodjvarac wrote:
> I have a array of ubyte-s and need to cast for example from 4-th element
> to 8-th element into int, anyone knows how to do that?
> ubyte buffer;
> listener.receiveFrom(buffer, address);
> writefln("Transaction ID: %s", cast(int)buffer[4 .. 8]);
But you better be sure the endianness of the data is the same as the
platform you're reading it on.
More information about the Digitalmars-d-learn