Some of Tcl's documentation refers to ''procedure''s as a distinct type of command. A ''procedure'' is a Tcl command that is created by the [proc] command. For example the [info args] command expects its argument to be the name of a procedure. Names of other commands passed to [info args] will cause an error to be raised. ---- Some languages (e.g. [Pascal]) uses the terms "function" and "procedure" to denote subroutines which do and don't respectively return a value. In Tcl, the distinction is quite different: a ''function'' is a subroutine available in [expr]essions (and as of Tcl 8.5 these are merely implemented by commands in the [tcl::mathfunc] namespace). A ''procedure'' is a command created by [proc], and like any other command it returns a value. In the absence of an explicit [return], this value is simply the value returned by the last command in the procedure body. ---- see also [Pass by reference] and [Implicit upvar]. ---- !!!!!! %| [Category Glossary] |% !!!!!!