mirror of
https://github.com/KarolS/millfork.git
synced 2026-04-25 03:16:44 +00:00
Added constant-only functions min, max, if. Improved handling of constant-only functions.
This commit is contained in:
@@ -199,7 +199,7 @@ Fields of arithmetic, pointer and enum types are declared using normal expressio
|
||||
Fields of struct types are declared using struct constructors.
|
||||
Fields of union types cannot be declared.
|
||||
|
||||
What might be useful is the fact that the compiler allows for built-in trigonometric functions
|
||||
What might be useful is the fact that the compiler allows for certain built-in functions
|
||||
in constant expressions only:
|
||||
|
||||
* `sin(x, n)` – returns _n_·**sin**(*x*π/128)
|
||||
@@ -208,3 +208,7 @@ in constant expressions only:
|
||||
|
||||
* `tan(x, n)` – returns _n_·**tan**(*x*π/128)
|
||||
|
||||
* `min(x,...)` – returns the smallest argument
|
||||
|
||||
* `max(x,...)` – returns the largest argument
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ The `if` function returns its second parameter if the first parameter is defined
|
||||
#infoeval if(0, 400, 500)
|
||||
|
||||
TODO
|
||||
`not`, `lo`, `hi`, `+`, `-`, `*`, `|`, `&`, `^`, `||`, `&&`, `<<`, `>>`,`==`, `!=`, `>`, `>=`, `<`, `<=`
|
||||
`not`, `lo`, `hi`, `min`, `max` `+`, `-`, `*`, `|`, `&`, `^`, `||`, `&&`, `<<`, `>>`,`==`, `!=`, `>`, `>=`, `<`, `<=`
|
||||
|
||||
The following Millfork operators and functions are not available in the preprocessor:
|
||||
`+'`, `-'`, `*'`, `<<'`, `>>'`, `:`, `>>>>`, `nonet`, all the assignment operators
|
||||
|
||||
Reference in New Issue
Block a user