User Defined Functions |
|
| Top Previous Next | |
It is possible to create functions within a script, using DialogScript code.
A function definition starts with a label, which has the same name as the function name. The function ends when an exit command is reached.
A function is used in the same way as a built-in function, using its name prefixed by "@" and followed by a pair of brackets, which may enclose up to 9 arguments.
The values of these arguments can be accessed within the function code itself using %1, %2 .. %9.
To return a value as the result of a user-defined function, one string may be given as the parameter to the function's EXIT command.
See also: