This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| crpl:docs:call [2021/02/05 16:43] – Rmoved discussion tag Karsten75 | crpl:docs:call [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| ===== @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 === | ||
| - | Example for [[crpl: | + | |
| - | < | + | < |
| - | # invoke | + | 3 4 @MyMathFunction Trace |
| - | # with the value " | + | |
| - | # a rapid (speed 100) move. | + | :MyMathFunction |
| - | 35 @chance if | + | ->b -> |
| - | 100 @relocate | + | <-a <-b * <-a - # multiply both and subtract the first |
| - | endif | + | |
| </ | </ | ||