Re: TIB: Goto's
[Prev][Next][Index][Thread]
Re: TIB: Goto's
Grant Stockly wrote:
> >Grant Stockly wrote:
> >
> >> This is what I do for my sub programs. I make a list of all the
> >> subroutines I need to do and then this:
> >>
> >> :"Looks for which routine to run
> >> :If A=1:Then:Goto 1:End
> >> :If A=2:Then:Goto 2:End
> >> :If A=3:Then:Goto 3:End
> >> :If A=4:Then:Goto 4:End
> >> :"Return if you made a mistake
> >> :Return
> >> :
> >> :Lbl 1:5->B:Return
> >> :Lbl 2:5->C:Return
> >> :Lbl 3:5->D:Return
> >> :Lbl 4:5->E:Return
> >>
> >> This is a real bad example, but it is what I do...
> >
> >You don't need the "Then" and "End" after your 4 If statements. Are you
> >thinking of the Lbl as a subroutine? It doesn't work exactly that way.
>
> It does work that way. I've done it many times. Lbl isn't the sub
> routine, 5->X is the pathetic routine.
But your "Return" doesn't go back up to the "End" statement, it ends the
program (assuming all this code is in the same program).
--
Bryan Rabeler <brabeler@ticalc.org>
File Archives
the ticalc.org project - http://www.ticalc.org/
References: