This is a draft cheat sheet. It is a work in progress and is not finished yet.
Basic math operators
** |
Exponent |
% |
Modulus |
// |
Integer division |
* |
Multiplication |
- |
Subtraction |
+ |
Addition |
Also, use brackets to override the usual precedence
Variable name rules
1. Only one word allowed |
2. Only numbers, letters and underscores allowed |
3. Can't start with a number |
|
|
Examples of literals
Integer literals |
1, 2, 0, -1, -3234 |
Floating point literals |
2.15, -1.25, 0.0 |
String literals |
"string", 'spam', '' |
Comments
# |
Marks the comment until EOL |
|
|
String Concatenation and Replication
+ |
Concatenates 2 strings |
string * n |
Replicates the string n times |
Note that replication needs integer as the right-hand value
|