> For the complete documentation index, see [llms.txt](https://glados.guillaume-hein.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://glados.guillaume-hein.fr/features/syntactic-sugar.md).

# Syntactic Sugar

GoMelan supports different kind of syntactic sugar (shorter ways of writing the same code).

### List of supported syntax

* `var++` and `var += 1` -> add 1 to var
* `var--` and `var -= 1` -> substract 1 from var
* `for (<variable-declaration> ; <condition> ; <variable-update>)` for loop simplification

```php
fn main() -> Bool
{
    a: Float = 0.5;
    
    for (i: Float = 0.0; i <= a; i += 0.1) {
        if (i > a) {
            return false;
        }
    }
    return true;
}
```

**Output:**

```
true
```

1. Declare one Float variable.
2. Loop while i is lower or equal to a.
3. If there is no problem, the code returns True and otherwise False.
