Simplified Evaluate function

This commit is contained in:
Eduard Urbach 2025-02-27 15:30:44 +01:00
parent 9f78733d5d
commit efb3089211
No known key found for this signature in database
GPG key ID: C874F672B1AF20C0
15 changed files with 98 additions and 96 deletions

20
tests/programs/for.q Normal file
View file

@ -0,0 +1,20 @@
main() {
total := 0
for 0..10 {
total += 1
}
assert total == 10
for 0..total {
total -= 1
}
assert total == 5
for i := 0..10 {
assert i >= 0
assert i < 10
}
}

View file

@ -1,14 +0,0 @@
main() {
x := 0
for 0..5 {
x += 1
}
assert x == 5
for i := 0..5 {
assert i >= 0
assert i < 5
}
}