aboutsummaryrefslogtreecommitdiff
path: root/jim_tcl.txt
diff options
context:
space:
mode:
Diffstat (limited to 'jim_tcl.txt')
-rw-r--r--jim_tcl.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/jim_tcl.txt b/jim_tcl.txt
index 8684ed9..2c5409e 100644
--- a/jim_tcl.txt
+++ b/jim_tcl.txt
@@ -2489,6 +2489,23 @@ The following two are identical.
set x $(3 * 2 + 1)
----
+However note that the expr shorthand syntax may not be nested in an expression.
+This is to prevent the common mistake of writing:
+
+----
+ if {$(1 + 2) == 3) {
+ ...
+ }
+----
+
+rather than:
+
+----
+ if {(1 + 2) == 3) {
+ ...
+ }
+----
+
file
~~~~
+*file* 'option name ?arg\...?'+