Initial import of TransPyV
This commit is contained in:
23
Test/App/flow_test.py
Normal file
23
Test/App/flow_test.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import stdio
|
||||
import t, c
|
||||
|
||||
|
||||
def flow_test() -> int:
|
||||
i: int = 0
|
||||
total: int = 0
|
||||
while i < 5:
|
||||
total = total + i
|
||||
i = i + 1
|
||||
stdio.printf("while: total=%d i=%d\n", total, i)
|
||||
|
||||
for k in range(10):
|
||||
if k == 3:
|
||||
break
|
||||
stdio.printf("break: k=%d\n", k)
|
||||
|
||||
for m in range(5):
|
||||
if m == 2:
|
||||
continue
|
||||
stdio.printf("continue: m=%d\n", m)
|
||||
|
||||
return 0
|
||||
Reference in New Issue
Block a user