May 01, 2023 Something odd in docs: printf: 32.5.2 size_t and ptrdiff_t | ||||
---|---|---|---|---|
| ||||
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? |
May 01, 2023 Re: Something odd in docs: printf: 32.5.2 size_t and ptrdiff_t | ||||
---|---|---|---|---|
| ||||
Posted in reply to Cecil Ward | 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 |
Copyright © 1999-2021 by the D Language Foundation