Warning
You're browsing the old v2.x documentation. This version is no longer maintained. Click here to go the v3.x documentation.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
fun [2019/12/09 21:22] – [Defining functions] neils | fun [2019/12/09 21:28] – [Calling functions] neils | ||
---|---|---|---|
Line 49: | Line 49: | ||
==== Functions with no parameters ==== | ==== Functions with no parameters ==== | ||
- | You can omit the parameter list, but bear in mind that you have to omit the parentheses | + | You can omit the parameter list, but bear in mind that you still have to write the empty parentheses: |
- | fun no_params_no_parentheses | + | fun no_params() |
... | ... | ||
endfun | endfun | ||
Line 58: | Line 58: | ||
You can call a function from within an expression by using the function name, sigil and the argument list in parentheses, | You can call a function from within an expression by using the function name, sigil and the argument list in parentheses, | ||
- | let x! = my_function!(a, | + | let x! = my_function!(a, |
| | ||
Note that in the example above '' | Note that in the example above '' |