forked from ground/ground
Start work on functions
This commit is contained in:
@@ -232,7 +232,21 @@ Some symbols specific to this category:
|
||||
|
||||
Defines a function. All code between `fun` and `endfun` will be included in the function.
|
||||
|
||||
Usage: `fun !functionname -type &var -type &var -type &var # and so on...`
|
||||
Usage: `fun -type !functionname -type &var -type &var -type &var # and so on...`
|
||||
|
||||
Usage note: The first type specified before the function name must be the return type. The type displayed before all vars
|
||||
|
||||
#### local
|
||||
|
||||
Defines a variable. The variable will be destroyed when the function is finished.
|
||||
|
||||
Usage: `local &var $value`
|
||||
|
||||
#### return
|
||||
|
||||
Returns back to the main program (or other function that called this function). Also returns a value, which must be of the type defined when defining the function.
|
||||
|
||||
Usage: `return $value`
|
||||
|
||||
#### endfun
|
||||
|
||||
|
Reference in New Issue
Block a user