#1073 incorrect return value for "scan" command

obsolete: 8.2.2
closed-fixed
nobody
23. [scan] (15)
2
2001-04-18
2000-10-26
Anonymous
No

OriginalBugID: 3700 Bug
Version: 8.2.2
SubmitDate: '1999-11-29'
LastModified: '1999-11-29'
Severity: SER
Status: Released
Submitter: techsupp
ChangedBy: hobbs
OS: Linux-Red Hat
OSVersion: GNU-Linux Red-Hat 5.2 and Mandrake 6.0
Machine: PC based Celeron
FixedDate: '1999-11-29'
FixedInVersion: 8.3b1
ClosedDate: '2000-10-25'

Name: Eric THIEBAUT

ReproducibleScript:
scan "= F" " = %\[TF\]" var ;# OK: return expected result: 1, with var set to "F"
scan "= f" " = %\[TF\]" var ;# BUG: return unexpected result: 1 (instead of 0), with var set to {}

ObservedBehavior:
The builtin command "scan" in Tcl-8.2.2 does not correctly behave with set of characters (see code sample). I have checked that Tcl-8.0 behaves as expected.

DesiredBehavior:
see comments in sample code

The CharSet matching in tclScan.c wasn't taking into account
the case where nothing matched a charset and we should finish.
This is fixed for 8.3b1.
-- 11/29/1999 hobbs

Discussion

  • Brent B. Welch
    Brent B. Welch
    2000-10-26

    • priority: 5 --> 2
    • status: open --> closed-fixed
     
  • Don Porter
    Don Porter
    2001-04-18

    • labels: 104246 --> 23. [scan]
    • summary: incorrect return value for "scan" command --> incorrect return value for "scan" command