From c1b442f8438facc128e6377d3abf4ec5c2b04d29 Mon Sep 17 00:00:00 2001 From: cozis Date: Sat, 12 Mar 2022 19:37:16 +0100 Subject: [PATCH] wrote even more docs --- docs/language.md | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/docs/language.md b/docs/language.md index cb3185f..fee4b1a 100644 --- a/docs/language.md +++ b/docs/language.md @@ -4,18 +4,14 @@ This documentation was intended for people who already program in other high lev ## TL;DR Here's an overview: -1. The available types are: - 1. ints - 2. floats - 3. strings - 4. lists (arrays) - 5. maps (associative arrays) -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. -3. Division between integers rounds down the result. -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. +1. The available types are `int`, `float`, `bool` +`string`. `list` (array), `map` (associative array), `none` (null) +3. No implicit casts. +2. Arithmetic operations only allowed on numbers. +3. Division between `ints` rounds down. +4. Logical operators expect boolean operands. +5. Assignments are expressions that return the newly assigned value. +6. No for loop (yet) ## Table of contents 3. [The first program](#the-first-program) @@ -291,4 +287,4 @@ As an example, the `print` function always returns `none` ```py print(print()); # none -``` \ No newline at end of file +```