Re: TIB: Programming Methods...


[Prev][Next][Index][Thread]

Re: TIB: Programming Methods...





-----Original Message-----
From: Jody <jody1@alaska.net>
To: ti-basic@lists.ticalc.org <ti-basic@lists.ticalc.org>
Date: Thursday, February 05, 1998 5:34 PM
Subject: Re: TIB: Programming Methods...


>
>> You could always do this:
>> :0->X
>> :While X<10
>> :X+1->X
>> :If X>A
>> :Goto 1
>> :End
>> :Goto 2
>> :Lbl 1
>> :End
>> :Lbl 2
>
>That'll work, but it feels kinda clumsy. In this case, I think the
>_best_ way would be
>:For(X,1,10
>:If X>A
>:11->X
>:End
>
>This all depends on whether you need to know the value X or not.
>Actualy, in this case you can still find out; the acutal value of X
>_should_ be A-1.
>
>Jody Snider
>jody1@alaska.net
>


But what if you want to go to go to different places depending on the value
of x?
Such as:

:For(A,1,5)
:If L1(A)=3:Then
:L1(A)+5/->/L1(A)
:Goto 3
:End
:If L1(A4:Then
:L1(A)+5/->/L1(A)
:Goto 4
:End
:If L1(A)=5:Then
:L1(A)+5/->/L1(A)
:Goto 5
:End



Follow-Ups: