4-character literal

Anders F Björklund afb at algonet.se
Fri Jan 26 14:58:01 PST 2007


Bill Baxter wrote:

> Besides isn't the value of a multi-character literal going to be 
> dependent on the endianness of the machine you're running on?

Not really, it just gets flipped when _stored_ on a LittleEndian...
i.e. the char const 'ABCD' is the same as the hex const 0x41424344

In arch i386 this would read 44434241 but in arch ppc it's 41424344.
That is, if you were to store it somewhere or look at the objectfile.

--anders



More information about the Digitalmars-d mailing list