[Issue 905] New: printf strangeness

Frank Benoit (keinfarbton) benoit at tionex.removethispart.de
Mon Jan 29 17:07:04 PST 2007


>   for (i = 0; i < 10; i++) {
>     addr = cast(ulong)(&i) + i;
>     addr = ((addr + 3) >> 2) << 2;
>     printf("%d %d %d \n", i, addr, i);
>   }

Can you try this?
	printf("%d %lld %d \n", i, addr, i);
the 'll' tells printf about the 'long' type.
if you want to print a pointer type, use %p.



More information about the Digitalmars-d-bugs mailing list