Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2016-10-12
14:03 • Closed ticket [be003d570f]: scan 0x40 %o plus 7 other changes artifact: fc34fa494b user: dgp
14:02 • Ticket [be003d570f]: 3 changes artifact: b1118e8334 user: dgp
13:46
[be003d570f] TclParseNumber() failed to fully implement TCL_PARSE_BINARY_ONLY. check-in: bb5488f1a7 user: dgp tags: core-8-6-branch
13:42
[be003d570f] TclParseNumber() failed to fully implement TCL_PARSE_OCTAL_ONLY. check-in: 3bb6116dfc user: dgp tags: core-8-6-branch
13:31
[be003d570f] TclParseNumber() failed to fully implement TCL_PARSE_OCTAL_ONLY. check-in: d4054bee77 user: dgp tags: core-8-5-branch
13:18 • Ticket [be003d570f] scan 0x40 %o status still Open with 3 other changes artifact: b62800abf4 user: dgp
13:17 • Ticket [be003d570f]: 3 changes artifact: 00599d0ad2 user: dgp
00:09 • Ticket [be003d570f]: 4 changes artifact: 7fe79edddd user: ferrieux
2016-10-11
19:47 • Ticket [be003d570f]: 3 changes artifact: 81d129118d user: dgp
18:33 • New ticket [be003d570f]. artifact: 35921cfee2 user: dgp

scan 0x40 %o

Closed / Fixedbe003d570f6d392e02644e25f84d1cd82082bf0aCreated 10 years agoUpdated 10 years ago
Descriptionplain2016-10-11 18:33:50
Somewhere along the way we botched this:

% scan 0x40 %o
64
Referenced by3
  • bb5488f1a7[be003d570f] TclParseNumber() failed to fully implement TCL_PARSE_BINARY_ONLY. check-in2016-10-12 13:46:14
  • 3bb6116dfc[be003d570f] TclParseNumber() failed to fully implement TCL_PARSE_OCTAL_ONLY. check-in2016-10-12 13:42:40
  • d4054bee77[be003d570f] TclParseNumber() failed to fully implement TCL_PARSE_OCTAL_ONLY. check-in2016-10-12 13:31:07
dgpplain2016-10-11 19:47:12
TIP 237
ferrieuxplain2016-10-12 00:09:44
Yes, it looks like %o has implied TCL_SCAN_PREFIXES since the TIP implementation. I assume there was some deep reason ; kbk might remember it ?

Note that [scan 0x40 %x] also wrongly returns 64, but by a different mechanism: %x only sets parseFlag to TCL_PARSE_HEXADECIMAL_ONLY, but then morphs the opcode into 'i'; the code for 'i' subsequently uses (parseFlag | TCL_SCAN_PREFIXES), which is the intended semantics for %i. So the %x variant is rather a consequence of "optimistic refactoring"...
dgpplain2016-10-12 13:17:39
[scan 0x40 %x] => 64 is the correct result.
dgpplain2016-10-12 13:18:10
Patches coming.
dgpplain2016-10-12 14:02:50
[scan 0x40 %b] was also broken in 8.6+
dgpplain2016-10-12 14:03:17
Fix on all branches.
Log in (anonymous is fine) to add a comment.