Re: goto, label


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

Re: goto, label



Chris Hiszpanski wrote:
>
> To: any one who can help
>
> I am making a program. If I was to choose a random integer from 1 to 10 and
> then use the goto command to go to that label, how would I do it?
>
> From: Chris
> mecad@scv.net


On the TI-92 I'd do it like this:

local i
rand(10)->i
goto #("mark"&string(i))

lbl mark1
..code..

lbl mark2
..code..

........

lbl mark10
..code..


OF COURSE you can replace the first part by:
goto #("mark"&string(rand(10)))

Regards,
        Roman.


References: