Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2008-08-20
09:34 • Ticket [2059850fff] String Map status still Closed with 4 other changes artifact: 16f14d874e user: nobody
2008-08-19
21:32 • Closed ticket [2059850fff]. artifact: ef8b11b9a8 user: dkf
14:20 • New ticket [2059850fff]. artifact: 15a1cbcbb3 user: nobody

String Map

Closed / Invalid2059850fffffffffffffffffffffffffffffffffCreated 18 years agoUpdated 18 years ago
Descriptionplain2008-08-19 14:20:44
8.5.4 & 8.4
Windows

Do not appear to be able to use a string variable in a string map key as per sample command below

It may be my problem in lack of understanding rather than a bug, I am not sure. If so apologies in advance

Command

[string map {$str ""} "$string list"]

Simple removal of a string from a list of strings

The variable "$string list" works fine but unable to set a variable in the key "$str" , replace it with a text string & all ok

Have tried all permutations on syntax with bracketing etc to no avail

I understood variables were now permitted


[email protected]
dkfplain2008-08-19 21:32:37
Logged In: YES 
user_id=79902
Originator: NO

use this:
  string map [list $str ""] $stringToChange
[email protected]plain2008-08-20 09:34:05
Logged In: NO 

Thank you, it is appreciated, thought it may have been my inexperience


[email protected]
Log in (anonymous is fine) to add a comment.