Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-23
01:59 • Closed ticket [218189ffff]: Proper error reporting of $:var plus 3 other cha... artifact: 2ad17e30c3 user: dgp
01:57 • Open ticket [218189ffff]. artifact: cfd00ee5c9 user: dgp
2000-10-26
08:16 • Closed ticket [218189ffff]. artifact: 14f82c764b user: welch
00:54 • New ticket [218189ffff]. artifact: d851e105d9 user: nobody

Proper error reporting of $:var

Closed / Fixed218189ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:54:18
OriginalBugID: 2358 Bug
Version: 8.1.1
SubmitDate: '1999-07-16'
LastModified: '1999-09-15'
Severity: MED
Status: Closed
Submitter: techsupp
ChangedBy: hobbs
OS: Other
Machine: NA
FixedDate: '2000-10-25'
ClosedDate: '1999-09-15'


Name:
Jeffrey Hobbs

ReproducibleScript:
(ssi) 68 % puts $:input
    $:input
    (ssi) 69 % puts $input
    can't read "input": no such variable
    (ssi) 70 % puts $::input
    can't read "::input": no such variable

ObservedBehavior:
With Tcl7.6, a var like $: $/ $^ (does this look like Perl or what?)
    was just ignored (not interp'd, just returned as is).  With namespaces
    in Tcl8, the interp of :: in vars changed.  However, when I write the
    above "bug", it doesn't consider it as a possible in 8.0 semantics,
    but rather just ignores it and returns the string.

DesiredBehavior:
With 8.0+, I would expect the above to have returned an error.
    It is a change from Tcl7, but so is the general treatment of ':'
    in a var.  Otherwise, it can lead to some tricky error (since it
    doesn't actually complain).



This isn't necessary, just code better. 
-- 09/15/1999 hobbs
welch Closed ticket [218189ffff]. [History diff]2000-10-26 08:16:55
dgp Open ticket [218189ffff]. [History diff]2001-04-23 01:57:22
dgp Closed ticket [218189ffff]. [History diff]2001-04-23 01:59:50
Log in (anonymous is fine) to add a comment.