Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2013-10-22
18:59 • Closed ticket [3556215fff]: scan and capital X conversion character plus 7 o... artifact: d6a30420ea user: dkf
18:58
[3556215]: Made [scan] match [format] better in what it accepts as a format string, by allowing uppe... check-in: 815e766d3e user: dkf tags: trunk
18:55
[3556215]: Made [scan] match [format] better in what it accepts as a format string, by allowing uppe... check-in: e077937cf0 user: dkf tags: core-8-5-branch
18:34 • Ticket [3556215fff] scan and capital X conversion character status still Ope... artifact: d9e2683fc6 user: dkf
2013-10-21
18:43 • Ticket [3556215fff]: 6 changes artifact: 43fd61d268 user: dkf
2012-08-21
19:57 • Ticket [3556215fff]: 5 changes artifact: f65172f35d user: dgp
17:22 • Ticket [3556215fff]: 4 changes artifact: ca8987f16f user: avl42
2012-08-20
21:36 • Ticket [3556215fff]: 4 changes artifact: 3e3404484c user: dgp
2012-08-13
06:16 • Ticket [3556215fff]: 6 changes artifact: bc63a95682 user: dkf
2012-08-11
06:59 • Ticket [3556215fff]: 4 changes artifact: 626d5982bc user: avl42
06:56 • Ticket [3556215fff]: 1 change artifact: ea1f4ed8f2 user: avl42
2012-08-10
23:56 • New ticket [3556215fff]. artifact: aa96408625 user: avl42

scan and capital X conversion character

Closed / Fixed3556215fffffffffffffffffffffffffffffffffCreated 14 years agoUpdated 13 years ago
Descriptionplain2012-08-10 23:56:28
In the man-page of scan, 4 deviations from "ANSI C sscanf" are presented.
These exceptions do not mention omission of "%X" (defined as equiv to "%x" in sscanf manpage).
avl42 Ticket [3556215fff]: 1 change [History diff]2012-08-11 06:56:52
avl42plain2012-08-11 06:59:58
Of course, imho, %X should be allowed in scan,
*not* a 5th exception added to the doc. :)
dkfplain2012-08-13 06:16:12
I'd be inclined to view this as a bug, not a feature change (though it *technically* is). Likelihood of breaking working code is probably minimal. Comments?
dgpplain2012-08-20 21:36:55
I don't like the habits such a change would encourage, but
I don't care enough to fight about it.

What's the patch look like?
avl42plain2012-08-21 17:22:51
I'm glad you don't "fight" about it, but I don't even understand what kind of habits you fear this could encourage.

The patch would add a second case label for 'X' to the one for 'x' (generic/tclScan.c:736)
and a paragraph like
  .TP
  \fBX\fR
  .
  equivalent to x
in the manpage (doc/scan.n just before line 107).
Did I overlook anything? Is there a bytecode-path that would need a change as well?

I hope the man-page snippet doesn't get fubar'ed by sf.
dgpplain2012-08-21 19:57:43
When you are programming, case matters.  When you revise the
language to accommodate those who program as if case does not
matter, you reward and encourage sloppiness.  Passing on to dkf
to coordinate checking in the patch.
dkf Ticket [3556215fff]: 6 changes [History diff]2013-10-21 18:43:04
dkfhtml2013-10-22 18:34:20

Also doing “E” and “G” as those are also case-variant in format.

dkfhtml2013-10-22 18:59:42

Done on 8.5 and trunk.

Log in (anonymous is fine) to add a comment.