Index: doc/example-scripts/tk-ludo.tcl =================================================================== diff -u -rc08415f59c4ce753f976d0513d6208426772ef2a -rf69105999ff5876732032cd779f3f7521ab010e5 --- doc/example-scripts/tk-ludo.tcl (.../tk-ludo.tcl) (revision c08415f59c4ce753f976d0513d6208426772ef2a) +++ doc/example-scripts/tk-ludo.tcl (.../tk-ludo.tcl) (revision f69105999ff5876732032cd779f3f7521ab010e5) @@ -200,7 +200,7 @@ # Roll the dice and animate rolling # # wiggle: amount, pick one of eight wiggle directions - set dwig [expr ${:size}/5] + set dwig [expr {${:size}/5}] for {set i 10} {$i<100} {incr i 10} { :set [expr {int(rand() * 6) + 1}] set wig [random:select {0,1 0,-1 1,0 -1,0 1,1 -1,1 1,-1 -1,-1}] @@ -340,13 +340,13 @@ if {$x0 eq $x1} { # vertical set f [expr {$y1<$y0 ? -1.25 : 1.25}] - for {set i 0} {$i < [expr {int(abs($y1-$y0)/($d*1.25))}]} {incr i} { + for {set i 0} {$i < int(abs($y1-$y0)/($d*1.25))} {incr i} { :point $x0 $y0+$i*$d*$f $d } } else { # horizontal set f [expr {$x1<$x0 ? -1.25 : 1.25}] - for {set i 0} {$i < [expr {int(abs($x1-$x0)/($d*1.25))}]} {incr i} { + for {set i 0} {$i < int(abs($x1-$x0)/($d*1.25))} {incr i} { :point $x0+$i*$d*$f $y0 $d -number } } @@ -391,7 +391,7 @@ :pnest $m+$o-$d $m+$o-$d $d2 1 -1 -2.5 :pnest $d15 $m+$o-$d $d2 2 1 -2.5 :pnest $d15 $m-$o+$d $d2 3 1 3 - for {set i 0;set y [expr $d*2]} {$i<4} {incr i;set y [expr {$y+$d}]} { + for {set i 0; set y [expr $d*2]} {$i<4} {incr i;set y [expr {$y+$d}]} { lappend p(0) [:point $m $y $d2 -fill [lindex ${:colors} 0]] lappend p(1) [:point $m*2-$y $m $d2 -fill [lindex ${:colors} 1]] lappend p(2) [:point $m $m*2-$y $d2 -fill [lindex ${:colors} 2]] Index: library/lib/nx-shell.tcl =================================================================== diff -u -r8f55f92215f230309235aa89dc99dcf3760e83da -rf69105999ff5876732032cd779f3f7521ab010e5 --- library/lib/nx-shell.tcl (.../nx-shell.tcl) (revision 8f55f92215f230309235aa89dc99dcf3760e83da) +++ library/lib/nx-shell.tcl (.../nx-shell.tcl) (revision f69105999ff5876732032cd779f3f7521ab010e5) @@ -130,17 +130,17 @@ :public object method onTry {script args} { set l [llength $args] - for {set i 0; set j 1} {$i < $l} {incr i; set j [expr {$i+1}]} { + for {set i 0; set j 1} {$i < $l} {incr i; set j [expr {$i + 1}]} { # watch out for the finally handler - if {$i == [expr {$l-2}] && [lindex $args $i] eq "finally"} { + if {$i == $l - 2 && [lindex $args $i] eq "finally"} { set finallyScript [lindex $args $j] lset args $j [list [current] onHandler $finallyScript] break } # watch out for on-return handlers - if {$i < [expr {$l-3}] && [lindex $args $i] eq "on" && [lindex $args $j] in {return 2}} { + if {$i < $l - 3 && [lindex $args $i] eq "on" && [lindex $args $j] in {return 2}} { # imputate a wrapped return script - set idx [expr {$i+3}] + set idx [expr {$i + 3}] set returnScript [lindex $args $idx] lset args $idx [list [current] onHandler $returnScript] incr i 3