add blog posts: dollcode, python-goto

This commit is contained in:
2025-05-12 10:05:59 -07:00
parent e0e86e964c
commit 8a2343335c
14 changed files with 445 additions and 1 deletions

View File

@ -0,0 +1,49 @@
from goto_label import *
gaurd = 0
#LABEL say_hi
print('hi')
#LABEL loop_start
gaurd += 1
if gaurd > 2: goto &call_b
def a():
global gaurd
goto &a_skip
#LABEL a_label
print('inside a_label')
goto &loop_start
if gaurd:
return
#LABEL a_skip
print('a')
if gaurd < 2:
goto &say_hi
goto &a_label
...
def b():
global gaurd
goto &b_skip
#LABEL b_label
print('inside b_label')
goto &say_hi
goto &a_label
if gaurd > 2:
return
#LABEL b_skip
print('b')
goto &a_label
a()
goto &b_label
...
a()
print('done with a()')
goto &say_hi
...
#LABEL call_b
b()