Spyke

Syndicated from the fediverse. Read and engage on the original instance.

View original on lemmy.world

29 replies

lemmy.today

There have been variations on BASIC that use labels since at least the '80s.

8
lemmy.world

And variable names, too ... not sure why OP is reinventing the wheel here.

4

But you can already use the wheel. You could build a better mousetrap, but instead, you made something else, but with fewer features.

1
whalerossreply
lemmy.world

Yep. I remember moving from the C128 to the Amiga and go ooh.

Still cool that OP is coding their own BASIC interpreter though.

3

Thanks Whaleross, I don't know why some people have to look a gift horse in the mouth.

2
lemmy.world

Maybe you don't want it, that's fine. I developed it for myself, but since I enjoy Free Open Source software, I am giving it away to anyone who would like to play with it.

2
piefed.zip

As you are promoting it as something new I was hoping you would tell me about the unique aspects, advantages, or differences from existing options.

0
lemmy.world

It is less structured than bwbasic can be - it still uses goto and call (gosub) and If statments that can only goto someplace (not structured If statements) No case / switch statement yet. It is not as complete in the function area as it could be. It is still a work in progress. - The most unique things are lines you goto/call can be labeled - variables can have long names not just A1 B C7 etc. index, done, the keyword LET is required (for parsing reasons)

2
_NetNomadreply
fedia.io

yeah, that elevator pitch is BASIC as we've known it for 25 years. it has some other neat QOL features though like the C-style string printing

1

It is not a "visual basic", the code is less complicated, the interpreter is smaller and easier to change, and you get the source code (you do for Gambas too, but Gambas is way more complex)

1
lemmy.world

String arrays are a must, and you'll have to be able to keep open several different files at once. How about DATA/READ/RESTORE statements?

1
lemmy.world

I will consider those, thanks for the input. - I have constrained myself: Each statement starts with a unique letter, just to make parsing a tiny bit easier. Also so far I don't have file input - only output to files - for printing on a printer or sending to gnuplot perhaps. That does not mean I can't have an OPEN "filename",r to replace stdin temporarily.

2

Quick complete parsing of a fixed set of keywords can easily be done with a finite state automaton.

1
lemmy.world

for string arrays -- MAT $BOX(3,5) == 15 CHARACTERS OR 15 STRINGS ? I think it does the latter already. Note, I am nearly 70 years old - I got "help" coding this. (oh noe here comes a storm)

1
Treczoksreply
lemmy.world

MAT [dollar]BOX(3,5) should give a two-dimensional array of strings, of course.

1

"Mat $strings(400)" gives you $strings(0) .. $strings(399) just like C, You can do two dimensonal strig arrays also. Please look over the remaining unused letters and let me know how you would integrate DATA statement. Remember, I am keeping the first letter unique.

1

You reached the end

It's BASIC but not as we know it | Spyke