diff options
| author | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-01-11 15:08:35 +0100 |
|---|---|---|
| committer | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-01-11 15:08:35 +0100 |
| commit | b81e250fab7f54838a9b205e51a49bd5b932c618 (patch) | |
| tree | 60aa47663068e5b051fa291ea54ab02d21c791ac /tests/simple.tdy | |
| parent | cf9ad28eb0a62c2c89f2f679157a54eded97c1cf (diff) | |
| download | sylt-b81e250fab7f54838a9b205e51a49bd5b932c618.tar.gz | |
If-statements
Diffstat (limited to 'tests/simple.tdy')
| -rw-r--r-- | tests/simple.tdy | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/tests/simple.tdy b/tests/simple.tdy index 9d05b40..59355d2 100644 --- a/tests/simple.tdy +++ b/tests/simple.tdy @@ -13,19 +13,12 @@ // print d // print c -a int := 0 -b int := 3 -{ - a int := a + 1 - print a - - { - b int := 2 - print b - } - print b +a int := 2 +if a == 0 { + print 0 +} else if a == 1 { + print 1 +} else { + print 2 } -a = 4 -print a - // 1, 2, 3, 4 |
