mirror of
https://github.com/zekexiao/pocketlang.git
synced 2025-03-04 13:15:55 +08:00

The primary purpose of this change is to disambiguate between `else if` and `else \n if`. Even though it's a breaking change, since it's at the very early state we're allowed to make such breaking syntax change. lang.write function moved to io and io.stdin, io.stdout, io.stderr added for future streamed io operations io.File read, write, open, close, getline, seek, tell implemented str * int multiplication implemented
10 lines
159 B
Plaintext
10 lines
159 B
Plaintext
|
|
|
|
for i in 1..100
|
|
if i%3 == 0 and i%5 == 0 then print('fizzbuzz')
|
|
elif i%3 == 0 then print('fizz')
|
|
elif i%5 == 0 then print('buzz')
|
|
else print(i)
|
|
end
|
|
end
|