baysick icon indicating copy to clipboard operation
baysick copied to clipboard

Add GOSUB

Open fogus opened this issue 15 years ago • 0 comments

Baysick should support subroutines. They would work something like this:

10 PRINT "Subroutine test"
20 LET ('a := 0)
30 PRINT "Variable is " % 'a    // prints 0
40 GOSUB inc
50 PRINT "Variable is " % 'a    // prints 1
60 SUB "inc"
70 LET ('a := 'a + 1)
80 RETURN
90 GOSUB 60
100 PRINT "Variable is " % 'a    // prints 2
110 END

-m

fogus avatar Apr 17 '09 20:04 fogus