procedure <name> { <command_block> }
Create or redefine a procedure (a user function).
<name>
The name of the function
identifier. If <name>
already exists and is a function identifier it will be overwritten.
<command_block>
One or more
commands to be executed when the procedure is called. Parameters to the
procedure should be described via an args statement which must be the
first non-comment command in the block. The commands should be enclosed
within braces.
None
This command is synonymous with numeric_function command although its return value is generally not used.
Care should be taken to avoid infinite recursive loops where a procedure calls itself directly or indirectly.
When a procedure resides in an atable, the value of scope during execution of the procedure is set to that atable.
Caret substitution will be performed at procedure execution time. For caret substitution to be performed at definition time, begin a command in command_block with a / to expand ^(...) phrases on that particular line.
Create a proceudure to print a few statistics.
procedure pstats { idir ~*.*, -pr glist -pr list -fk, -ev, -pr } # Use of the function ... pstats()
Commands: |
|
Identifiers: |