This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| prpl:call [2016/12/02 23:33] – external edit 127.0.0.1 | prpl:call [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| <- [[.: | <- [[.: | ||
| - | ===== | + | ===== |
| ^Arguments^Result^Notation^ | ^Arguments^Result^Notation^ | ||
| - | | | | [ - ] | | + | | Depends on the function |
| === Description === | === Description === | ||
| + | Execute a function block defined after :FUNC_NAME, returning to this position when done. | ||
| + | |||
| + | Notes: | ||
| + | * Functions use the same stack and variables as the rest of the script. | ||
| + | * This is useful for passing arguments. | ||
| + | * The :FUNC_NAME is essentially a marker for where the script should go when @FUNC_NAME is encountered. | ||
| + | * When a function finishes, the script keep executing from after the @FUNC_NAME that triggered it | ||
| + | |||
| + | See also: [[.: | ||
| === Examples === | === Examples === | ||
| - | < | + | < |
| + | 1 -> | ||
| + | |||
| + | 10 @Square Trace #Will trace 100 | ||
| + | |||
| + | :Square # [ number - square ] Describe your function | ||
| + | -> | ||
| + | < | ||
| + | < | ||
| + | " | ||
| + | endif | ||
| + | </ | ||