RosettaCodeData/Task/Function-definition/Tcl/function-definition-2.tcl
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

8 lines
191 B
Tcl

proc tcl::mathfunc::multiply {arg1 arg2} {
return [expr {$arg1 * $arg2}]
}
# Demonstrating...
if {multiply(6, 9) == 42} {
puts "Welcome, Citizens of Golgafrincham from the B-Ark!"
}