mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
25 lines
329 B
Markdown
25 lines
329 B
Markdown
---
|
|
icon: dot
|
|
title: Goto Statement
|
|
---
|
|
|
|
pkpy supports `goto` and `label` just like C. You are allowed to change the control flow unconditionally.
|
|
|
|
## Syntax
|
|
|
|
```
|
|
$goto <identifier>
|
|
$label <identifier>
|
|
```
|
|
|
|
## Example
|
|
|
|
```python
|
|
for i in range(10):
|
|
for j in range(10):
|
|
for k in range(10):
|
|
$goto exit
|
|
|
|
$label exit
|
|
```
|