wrote even more docs
This commit is contained in:
+8
-12
@@ -4,18 +4,14 @@ This documentation was intended for people who already program in other high lev
|
|||||||
|
|
||||||
## TL;DR
|
## TL;DR
|
||||||
Here's an overview:
|
Here's an overview:
|
||||||
1. The available types are:
|
1. The available types are `int`, `float`, `bool`
|
||||||
1. ints
|
`string`. `list` (array), `map` (associative array), `none` (null)
|
||||||
2. floats
|
3. No implicit casts.
|
||||||
3. strings
|
2. Arithmetic operations only allowed on numbers.
|
||||||
4. lists (arrays)
|
3. Division between `ints` rounds down.
|
||||||
5. maps (associative arrays)
|
4. Logical operators expect boolean operands.
|
||||||
2. Arithmetic operators can only be performed on numeric values. If both operands are ints, the result is an int. If one of them is a float, the result is also a float.
|
5. Assignments are expressions that return the newly assigned value.
|
||||||
3. Division between integers rounds down the result.
|
6. No for loop (yet)
|
||||||
4. Relational operands `<`, `>`, `<=`, `>=` only work on integers. Operands `==` and `!=` work on every type of value.
|
|
||||||
5. Logical operators expect boolean operands
|
|
||||||
6. Assignments are expressions that modify the variable and return the newly assigned value.
|
|
||||||
7. There are if-else, while and do-while statements.
|
|
||||||
|
|
||||||
## Table of contents
|
## Table of contents
|
||||||
3. [The first program](#the-first-program)
|
3. [The first program](#the-first-program)
|
||||||
|
|||||||
Reference in New Issue
Block a user