set x 10
o/p:10
puts $x
o/p:10
set string “welcome to India”
o/p:welcome to India
puts $string
o/p:welcome to India
puts hai ; puts bye
o/p:
hai
bye
set i hai ; set x 5 ; puts "$i $x"
o/p:hai 5
set a 10.00 ; puts “I have $a rupees”
o/p:I have 10.00 rupees
set i hai ; set x 5 ; puts "$i \$x"
o/p:hai $x
puts {hai bye}
o/p:hai bye
set i 5
expr { $i<10 ? ($i+10) : ($i-10) }
o/p:15
set i [expr {$i+1} ]
o/p:6