Behaviour of %08X format specifiers on addresses
Jarrett Billingsley
kb3ctd2 at yahoo.com
Sat Sep 22 07:51:48 PDT 2007
"Graham" <grahamc001uk at yahoo.co.uk> wrote in message
news:fd32ak$255t$1 at digitalmars.com...
>I realize that the documentation says that the argument should be an
>integer type when using %X etc. format specifiers, so it works as I
>expected with
>
> writefln("p = %08X", cast(int)p);
>
> etc.
>
> But even so accepting a non-integer type and then supposing small values
> are only 16 bits seems a bit odd.
Try using
writefln("p = %08p", p);
It might even just be "%p".
More information about the Digitalmars-d-learn
mailing list