Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pete's Dumb Idea of the Day!
#18
(10-23-2024, 05:37 PM)Pete Wrote: I've loaded data into arrays using pretty much the same method as Spriggsy, so +1 for posting the example.
I thought about posting what Charlie just implemented, because it does cover using Restore with strings, however it won't substitute for an On Restore statement. Still, a nice implementation of string variables to decide what data label to restore. + 1
Fun discussion,
Pete

Well, that EVAL clause accepts numbers too, so happy with numbers for line numbers instead of strings for labels.

The main reason for EVAL was to not be tied to an index (i.e. 1, 2, 3 etc.) when an index is a pain in the rear.
So I could have a GOTO/GOSUB/RESTORE that will Branch to, say, a concatenation of x,y coordinates.

Code: (Select All)
branchline$ = 'x' + STR$( POINT(0) ) + 'y' + STR$( ( POINT(1) )

IF LABELEXISTS( branchline$ ) THEN GOSUB EVAL ( branchline$ )

Definitely not "standard" BASIC, but I'm building a BASIC I wish had been there for me right out of the gate.  Easy to do when one is one's own one-person standards committee?  Oh sure, I can have some pretty wicked arguments with myself ...
Reply


Messages In This Thread
Pete's Dumb Idea of the Day! - by Pete - 10-21-2024, 07:53 PM
RE: Pete's Dumb Idea of the Day! - by TDarcos - 10-23-2024, 02:47 AM
RE: Pete's Dumb Idea of the Day! - by CharlieJV - 10-22-2024, 12:01 AM
RE: Pete's Dumb Idea of the Day! - by dano - 10-22-2024, 01:08 AM
RE: Pete's Dumb Idea of the Day! - by Pete - 10-22-2024, 05:55 AM
RE: Pete's Dumb Idea of the Day! - by bplus - 10-22-2024, 10:40 AM
RE: Pete's Dumb Idea of the Day! - by a740g - 10-22-2024, 11:46 AM
RE: Pete's Dumb Idea of the Day! - by Petr - 10-22-2024, 03:57 PM
RE: Pete's Dumb Idea of the Day! - by Pete - 10-23-2024, 01:01 AM
RE: Pete's Dumb Idea of the Day! - by SMcNeill - 10-23-2024, 03:54 AM
RE: Pete's Dumb Idea of the Day! - by Pete - 10-23-2024, 07:59 AM
RE: Pete's Dumb Idea of the Day! - by CharlieJV - 10-23-2024, 01:07 PM
RE: Pete's Dumb Idea of the Day! - by Pete - 10-23-2024, 05:37 PM
RE: Pete's Dumb Idea of the Day! - by CharlieJV - 10-23-2024, 08:09 PM
RE: Pete's Dumb Idea of the Day! - by Pete - 10-23-2024, 10:29 PM



Users browsing this thread: 8 Guest(s)