mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
474 B
474 B
icon |
---|
dot |
goto/label
pkpy supports goto
and label
just like C. You are allowed to change the control flow unconditionally.
Syntax
Labels are named a dot .
and an identifier.
goto .<identifier>
label .<identifier>
Example
for i in range(10):
for j in range(10):
for k in range(10):
goto .exit
label .exit
!!!
If we detect an illegal divert, you will get an UnexpectedError
or the behaviour is undefined.
!!!