forked from ground/ground
50 lines
883 B
Plaintext
50 lines
883 B
Plaintext
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
|
|
|
|
!jumpy &tmp
|
|
|
|
stdlnout "I called a function"
|
|
|
|
# This function returns a list
|
|
|
|
fun -list !dingus
|
|
stdlnout "Testing lists in functions"
|
|
setlist *dingle "heheheha" "hahahahe" "hmmm"
|
|
return *dingle
|
|
endfun
|
|
|
|
call !dingus *outlist
|
|
|
|
getlistsize *outlist &size
|
|
set &counter 0
|
|
@loopstart
|
|
equal $size $counter &cond
|
|
if $cond %loopend
|
|
getlistat *outlist $counter &tmp
|
|
stdlnout $tmp
|
|
add 1 $counter &counter
|
|
jump %loopstart
|
|
@loopend
|
|
|
|
fun -int !doSomething -int &a -string &b
|
|
println $a
|
|
println $b
|
|
return 0
|
|
endfun
|
|
|
|
pusharg 432 "dingle"
|
|
!doSomething &ret
|