How to write a function in TCL

proc add {i j} {

set sum [expr {$i+$j}]

return $sum

}

add 2 5

o/p:7

puts "The returned value is [add 12 34]"

o/p:The returned value is 46