summaryrefslogtreecommitdiffstats
path: root/library/demos/square
diff options
context:
space:
mode:
Diffstat (limited to 'library/demos/square')
-rw-r--r--library/demos/square4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/demos/square b/library/demos/square
index 08c362b..8c1e497 100644
--- a/library/demos/square
+++ b/library/demos/square
@@ -27,7 +27,7 @@ focus .s
proc center {x y} {
set a [.s size]
- .s position [expr $x-($a/2)] [expr $y-($a/2)]
+ .s position [expr {$x - ($a / 2)}] [expr {$y - ($a / 2)}]
}
# The procedures below provide a simple form of animation where
@@ -51,7 +51,7 @@ proc timer {} {
if {$inc == 0} return
if {$s >= 40} {set inc -3}
if {$s <= 10} {set inc 3}
- .s size [expr {$s+$inc}]
+ .s size [expr {$s + $inc}]
after 30 timer
}