Experimental function jumping

This commit is contained in:
2025-08-24 16:30:42 +10:00
parent e9600d8500
commit 8da5a2bf93
2 changed files with 44 additions and 21 deletions

View File

@@ -1,14 +1,19 @@
fun -int !dingle -string &silly
stdlnout "This is inside the function"
stdout "The function argument is "
stdlnout $silly
return 10
fun -bool !jumpy
stdlnout "This is the jumpy function"
set &counter 0
jump %inloop
@jumpback
stdlnout "Yay I jumped!"
@inloop
add 1 $counter &counter
inequal 10 $counter &out
stdout "Condition is"
stdlnout $out
if $out %jumpback
stdlnout "Finished"
return true
endfun
stdlnout "This is outside the function"
call !jumpy &tmp
pusharg "heheheha"
call !dingle &var
stdout "Function returned "
stdlnout $var
stdlnout "I called a function"