Something odd in docs: printf: 32.5.2 size_t and ptrdiff_t
Petar
Petar
Mon May 1 09:32:44 UTC 2023
On Monday, 1 May 2023 at 00:50:37 UTC, Cecil Ward wrote:
> Re: possible bug in docs, in the following: see printf:
>
> ===
> 32.5.2 size_t and ptrdiff_t
>
> These use the zd and dt format specifiers respectively:
>
> int* p, q;
> printf("size of an int is %zt, pointer difference is %td\n",
> int.sizeof, p - q);
> ===
>
> The format specifiers don’t look right in the example, or am I
> missing the point?
Thanks for pointing out these problems. I reviewed the example
and opened a PR to fix it:
https://github.com/dlang/dlang.org/pull/3594
More information about the Digitalmars-d
mailing list