...
assignment statements
if and if-else statements
switch statements
comments : single line (//) and multiline (/*...*/)
operators :
increment operators (++ and --)
unary operators (- and !)
binary operators : power (^), multiply (*), modulo (%), divide (/), sum (+), min (-)
ternary operator (a = x ? b : x) see https://www.freecodecamp.org/news/c-ternary-operator/
conditional operators (|| and &&)
comparison (<=', >=, >, <, ==, '!=)
mathematical functions : exp, ln, sin, cos, sqrt, min(x1, x2), max(x1, x2)comments : single line (//) and multiline (/*...*/)
When using a variable that has not been defined before, the controller will equal the new variable to 0. This functionality can be used for initialisation purposes with the following topology:
The following built-in parameters can also be used without explicit definition in the code
time : the time variable of the simulation
timestep: the timestep of the simulation
here is an example with code : example.txt
...