format/scan %llu doesn't work
$ tclsh8.6 % scan 57 %llu a unsigned bignum scans are invalid % format %llu 57 unsigned bignum format is invalid
In ticket [1527169] I found the following explanation: "... and provided %llx, %llo, %llu and %lld format groups that work the same on all platforms."
Yes, %llu is provided on all platforms the same, but it always gives this error-message even though the provided number is positive. There is no reason why this would give an error, this error is not documented anywhere, neither are there any test-cases.
Suggestion (for 8.6 and up): Only when the formatted/scanned number is negative give this (same) error (for compatibility), for positive numbers let it behave the same as %lld. For negative numbers, another behavior could be implemented, but that's food for another TIP.
96aa2c6b01Minimum backport [4b12ccb336] to Tcl 8.6. If we do %lld/%llu we should do the %I32/%I64 (microsoft-)variants as well, otherwise TCL_LL_MODIFIER only is usable on non-Windows platforms check-in2024-05-02 12:46:47be99031456Fix [4b12ccb3363e81b132e8dbe12aeec596102be1a8|4b12ccb336]: format/scan %llu doesn't work. Also added new test-cases showing the expected behavior. check-in2017-04-05 09:09:2080252e0aedFix [4b12ccb3363e81b132e8dbe12aeec596102be1a8|4b12ccb336]: format/scan %llu doesn't work. Also added new test-cases showing the expected behavior. check-in2017-04-05 08:41:48
fix committed to core-8-6-branch and trunk
Hmmm. Since TIP 237 explicitly mentions that "llu" is invalid, a TIP will be needed to correct this. Therefore changing this to an RFE. No problem, just more work ....
Fixed as part of the TIP #514 implementation. Already available in Tcl 8.7 alpha.
I would favor to backport this to Tk 8.6. IMHO, it is just annoying...
Thanks, Harald
The behaviour is documented with [cab08bbf04] also for the format case.