Function definition: Difference between revisions

→‎{{header|Tcl}}: + mention tcl::mathfunc namespace
(→‎{{header|Tcl}}: formatting, do a function as opposed to a procedure...)
(→‎{{header|Tcl}}: + mention tcl::mathfunc namespace)
Line 520:
}</lang>
{{works with|Tcl|8.5}} <br>
You can also create functions that work directly inside expressions. This is done by creating the command with the correct name (that is, in the ''tcl::mathfunc'' namespace):
<lang tcl>proc tcl::mathfunc::multiply {arg1 arg2} {
return [expr {$arg1 * $arg2}]
Anonymous user