optional Full Description |
|
Syntaxargument-class argument-type argument-name optional (initial {initial-values})? Purpose Declares a function's argument as optional. An optional argument can be omitted from a call by omitting the preceding function argument separator together with the value of the argument. A value argument that is declared When an optional argument with no default value is omitted from a function call, it is illegal to access that argument from within the function in any way, except to test whether it was specified. (Whether an optional argument was specified in a call can be determined using the In particular, for an argument whose value is not specified in the function call, these two statements can be made:
For example, the following function is defined with an optional argument:
define function increment modifiable counter x by value counter y optional initial {1} as set x to x + y |