Skip to content
Tcl Source Code View Ticket
Login

View Ticket

referencing array indices containing backslashes

Closed / Fixed218229ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:54:50
OriginalBugID: 2662 Bug
Version: 8.2
SubmitDate: '1999-08-31'
LastModified: '1999-09-01'
Severity: SER
Status: Closed
Submitter: techsupp
ChangedBy: hobbs
OS: Windows 95
Machine: X86
FixedDate: '2000-10-25'
ClosedDate: '1999-09-01'


Name:
keith lea

ReproducibleScript:
% set X(\\f) f
    f
    % array get X
    {\f} f
    % foreach i [array get X] {puts $X($i)}
    f
    can't read "X(f)": no such element in array
    % set {X(\f)}
    can't read "X()": no such element in array
    % set {X(\\f)}
    f
    %

ObservedBehavior:
backslash substitution seems to be performed on array indices



This is a user error where [array names X] should be used
instead of [array get X]. 
-- 09/01/1999 hobbs
welch Closed ticket [218229ffff]. [History diff]2000-10-26 08:17:54
dgp Ticket [218229ffff]: 3 changes [History diff]2001-04-19 00:45:52
Log in (anonymous is fine) to add a comment.