standalone: Adapt loop example to output loop variable

David Mak 2023-09-05 09:38:50 +08:00
parent d37287a33d
commit 91749bb01b
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