3 ms·
Does that happen automatically in some cases? I think I'm on 8.6 and I'm pretty sure I forgot the expr and it worked OK. Could have been a string operation or
by fuball63 6y ago
Does that happen automatically in some cases? I think I'm on 8.6 and I'm pretty sure I forgot the expr and it worked OK. Could have been a string operation or something, I don't have the code to check on hand.
- suyjuris 6y agoThe string command accepts a special syntax for indices, which includes addition (but not the full power of expr) [1]. Maybe you are referring to this? Also, list commands accept the same syntax for list indices. Example: % string index abc 1 b % string index abc 1+1 c % string index abc 1+1+1 bad index "1+1+1": must be integer?[+-]integer? or end?[+-]integer? % string index abc end-1 b [1] http://www.tcl.tk/man/tcl8.6/TclCmd/string.htm#M54 http://www.tcl.tk/man/tcl8.6/TclCmd/string.htm#M54
- dvdkhlng 6y agoWell, you don't need 'expr' in contexts were an expression is expected, e.g. 'if' 'while', 'for' (2nd arg).
- fuball63 6y agoI think that this is what I was experiencing.