Sean Kelly wrote:
On Jan 15, 2011, at 1:47 PM, Walter Bright wrote:
A start:
http://www.digitalmars.com/d/2.0/32-64-portability.html
printf("s = '%.*s'\n", s.length, s.ptr); // 32 and 64 bit
Is the above correct? The above syntax expects an int for the length and
s.length will be a ulong. Or does the compiler do some sort of implicit cast?
Yes, it works fine. Both ints and ulongs are passed the same way, in an
8 byte value. The printf will just read the lower 4 bytes. If you're
sending a string larger than 4 gigs to printf, you've got other problems :-)
_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta