Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2002-07-27
00:28 • Closed ticket [587145ffff]: spaces in compiled expressions plus 7 other chan... artifact: 607f79e932 user: hobbs
00:27 • Ticket [587145ffff]: 4 changes artifact: 0bb6434f04 user: andreas_kupries
2002-07-26
17:22 • New ticket [587145ffff]. artifact: f0af47fb87 user: msofer

spaces in compiled expressions

Closed / Invalid587145ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 24 years ago
Descriptionplain2002-07-26 17:22:28
% set x {+ 1}
+ 1
% expr {$x + 1}
can't use non-numeric string as operand of "+"
% expr $x + 1
2
andreas_kupriesplain2002-07-27 00:27:43
Logged In: YES 
user_id=75003

This is not a bug but the expected behaviour. $x is a non-
numeric string, and braced expressions $x is a atom in the 
expression, and not interpolated into it. This is also the 
difference between

set op +
expr {1 $op 3}    (a)
expr 1 $op 3

op is not recognized in (a).
hobbsplain2002-07-27 00:28:47
Logged In: YES 
user_id=72656

I concur with aku.
Log in (anonymous is fine) to add a comment.