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.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
functions [2019/05/06 10:07] – created neils | functions [2019/05/06 10:10] – [Return type] neils | ||
---|---|---|---|
Line 7: | Line 7: | ||
Some functions may return miscellaneous types and you have to explicitly tell the compiler which type you require. Just like with variables, the return type of a function is denoted with a [[https:// | Some functions may return miscellaneous types and you have to explicitly tell the compiler which type you require. Just like with variables, the return type of a function is denoted with a [[https:// | ||
- | myInt = ABS(-5) | + | myInt = abs(-5) |
- | myFloat = ABS%(-3.14) | + | myFloat%= abs%(-3.14) |
+ | Another example is [[RND|RND]] that can return three types: | ||
+ | |||
+ | myRandomByte! | ||
+ | myRandomInt | ||
+ | myRandomFloat% = rnd%() |