Size modifiers j, q, z, t not implemented
Closed / Fixedc4f365470e1e9a4a713a19f0c2275b0a4620cce0Created 2 years agoUpdated 2 years ago
Descriptionmarkdown2024-12-12 07:58:38
TIP 697 as well as the manpage scan.n document the size modifiers j, q, z, t. However, this does not seem to be actually implemented? Is that an oversight or intentionally omitted with docs not updated?
% scan 42 %ld
42
% scan 42 %zd
{}
% scan 42 %td
{}
% info patch
9.0.0
Referenced by3
6c1255aa69Fix [c4f365470e]: Size modifiers j, q, z, t not implemented. Update changes.md check-in2024-12-13 10:18:585dba87ea38Fix [c4f365470e]: Size modifiers j, q, z, t not implemented check-in2024-12-13 09:59:57deae6f2c25Proposed fix for [c4f365470e]: Size modifiers j, q, z, t not implemented check-in2024-12-12 14:15:11
jan.nijtmanswiki2024-12-12 09:42:44
Those 4 are not useful for "scan", only for "format".
I see now that in the TIP I mentioned to implement them for "scan" as well. Why???? I don't remember. Maybe I planned to do that, but never did.
So, should we add it (implementation is easy, actually)?
apnadkarniplain2024-12-12 10:20:41
Also, the TIP and the manpage say the `L` modifiers behaves like `ll` (consistent with format and different from 8.6). However, it appears it still behaves like `l` as in 8.6. Given it has been TIP'ed and documented in the manpage, my preference is for the implementation to be fixed, particularly if as you say implementation is not too hard. Your TIP-697 branch seems to already have the code implemented! And as far as I can tell was merged into main. So no idea what happened!
apnadkarniplain2024-12-12 10:48:57
> Those 4 are not useful for "scan", only for "format". BTW I do think they are useful for scan as well as since using h or l instead would require a pointerSize check first.
jan.nijtmanswiki2024-12-12 14:16:25
[this] should work better. Good catch!
jan.nijtmanswiki2024-12-13 10:20:11
Fixed [here]
Log in (anonymous is fine) to add a comment.