digitalmars.D - Something odd in docs: printf: 32.5.2 size_t and ptrdiff_t
- Cecil Ward (10/10) Apr 30 2023 Re: possible bug in docs, in the following: see printf:
- Petar Kirov [ZombineDev] (4/14) May 01 2023 Thanks for pointing out these problems. I reviewed the example
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?
Apr 30 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
May 01 2023