standalone: Adapt loop example to output loop variable

This commit is contained in:
David Mak 2023-09-05 09:38:50 +08:00
parent 6de0884dc1
commit 17b4686260
1 changed files with 6 additions and 3 deletions

View File

@ -1,9 +1,12 @@
# For Loop using an increasing range() expression as its iterable
@extern
def output_int32(x: int32):
...
def run() -> int32:
for _ in range(10):
output_int32(_)
_ = 0
i = 0
for i in range(10):
output_int32(i)
output_int32(i)
return 0