[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LINE NUMBERS
Rex the Strange <roger.main@widgetinc.com> wrote:
> HEY, HERE'S ANOTHER ONE (oops, sorry for the uppercase - been
> telnetting to my AIIE)...
>
> I'm trying to learn ye olde basic - I'm finding this isn't working:
>
> [abstract example]
>
> 10 LNX = 1000
> 20 GOTO LNX
>
> [end abstract example]
>
> You can't use variables to denote line numbers!!?? PLEASE SAY IT AIN'T
> SO!! (now I'm actually screaming in incredulity).
>
> rts
How about this:
10 GOTO 1000
But seriously... Assuming you want to GOTO a different line depending on
the value of LNX then you might be able to do what you want with
ON LNX GOTO 1000,2000,3000
Which works like this: if LNX=1 then the program will GOTO 1000... if
LNX=2 then it will GOTO 2000 etc.
Also worth noting is that only the first two characters in a variable
name are used by Applesoft, so LNX and LNY would be the same.
--
._____.
|[LD8]! SIMON WILLIAMS :: LUDDITE ENTERPRISES UNLIMITED
| (O) | 68K MACINTOSH SERVER http://luddite.no-ip.com
!__!__! FAILURE RECORDS http://failurerecords.no-ip.com
- References:
- LINE NUMBERS
- From: "Rex the Strange" <roger.main@widgetinc.com>