Sunday, June 9, 2013

TCL Tutorials -Expressions


ex_expression.tcl


set r 2.0
set pi [expr { 4 * atan(1.0) }]
set area [expr {$pi * $r * $r}]

puts "r      : $r"
puts "pi     : $pi"
puts "area     : $area"

No comments:

Post a Comment