This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| crpl:docs:call [2013/01/18 00:56] – grauniad | crpl:docs:call [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ~~DISCUSSION~~ | + | |
| <- [[crpl: | <- [[crpl: | ||
| ===== @FUNC_NAME | ===== @FUNC_NAME | ||
| - | ^Arguments^Result^Notation^ | + | ===== Syntax ===== |
| - | | | |'' | + | |
| + | @FUNCTIONNAME | ||
| - | === Description === | + | ===== Description |
| - | Invokes a function. | + | |
| - | Execution passes to the function | + | Invokes a function |
| - | after the call when the function is complete. | + | after the call when the function is complete. Arguments can be passed to and received from functions via the stack. |
| - | Arguments can be passed to and received from functions via the stack. | + | |
| === Examples === | === Examples === | ||
| - | < | ||
| - | # invoke the function defined as an example at : | ||
| - | # with the value " | ||
| - | # a rapid (speed 100) move. | ||
| - | 35 @chance if | ||
| - | 100 @relocate #Move quickly | ||
| - | endif | ||
| - | </ | ||
| + | <code 4rpl> | ||
| + | 3 4 @MyMathFunction Trace # will print 9 to the stack (3 * 4 - 3) | ||
| + | |||
| + | : | ||
| + | | ||
| + | < | ||
| + | </ | ||