Arithmetic/Integer: Difference between revisions

m
→‎{{header|Tcl}}: comment about using braces in expr command
(FALSE)
m (→‎{{header|Tcl}}: comment about using braces in expr command)
Line 623:
puts "
$x + $y = [expr {$x + $y}]
$x - $y = [expr {$x - $y}]
$x * $y = [expr {$x * $y}]
$x / $y = [expr {int($x / $y)}]
$x mod $y = [expr {$x % $y}]
"
 
Line 636:
incr x $y
 
Also, it's important to surround the arguments to the <code>expr</code> in braces. Discussion is [http://wiki.tcl.tk/10225 here].
etc
 
=={{header|Toka}}==
Anonymous user