diff --git a/docs/features/goto.md b/docs/features/goto.md index e5c77fd2..acd4e45f 100644 --- a/docs/features/goto.md +++ b/docs/features/goto.md @@ -5,6 +5,10 @@ title: Goto Statement pkpy supports goto/label just like C. You are allowed to **change the control flow unconditionally**. +!!! +This feature is stable after v1.2.2. +!!! + ## Define a label ``` diff --git a/tests/27_goto.py b/tests/27_goto.py index f884730f..f0e764ba 100644 --- a/tests/27_goto.py +++ b/tests/27_goto.py @@ -19,4 +19,15 @@ for i in range(10): # [1] -> out b = True == out == -assert not b \ No newline at end of file +assert not b + +sum = 0 +i = 1 + +== loop == +sum += i +i += 1 +if i <= 100: + -> loop + +assert sum == 5050 \ No newline at end of file