Is there a good Basic interpreter?

he'll be the assembler in the room

I thought for a moment you said "elephant in the room". :stuck_out_tongue_winking_eye:

People paid me to write Basic on and off from 1980 to 1999 (last Y2K maintenance). I would BEG them to let it be C or Forth and they'd insist that if it was Basic then it would be more maintainable. Well at least by 85 it was compiled Basic.
Interpreter Basic is missing so much it is cruelty to work with. Compiler Basic is less so in proportion to how much it is C/C++ in disguise. I speak from a lot of experience!

Every time I'd get into assembler it seemed like no time before the new chips were out. I did some segments for pay and more for learning but as compilers got really good I said to hell with it. I wasn't making my living keeping with the latest. If anyone is then I'm happy for you, good on yer!

Basic was like a bad habit with no redeeming qualities that I couldn't find in a better, more capable language.

what exactly is wrong with a goto?

It doesn't provide inferior people the ability to feel otherwise.

What is wrong with GOTO? Nothing in particular if you can keep your program from turning into spaghetti.
OTOH spend time fixing other people's goto-ridden spaghetti code and you might get an idea about goto's.

Basic goto's get over-used by beginners who haven't figured out what gosub is for. But mind you they are superior beginners who already have a way and don't need to rely on gosub tricks.

DevilsChild:
... It has a weird syntax and only allows variables 27 from a-z.

I want to say that early BASIC was the same. Well, maybe 26 variables. Am I remembering correctly?

A1, A2, A%, A$, A*... at least by the mid-70's, probably sooner.*

From the Wikipedia article on Dartmouth Basic at Dartmouth BASIC - Wikipedia

Variable names were limited to A to Z, A0 to A9, B0 to B9, ..., Z0 to Z9, giving a maximum of 286 possible distinct variables. Array names were restricted to A to Z only

I have found that Bitlash users tend to run out of eeprom before they run out of variable names. And at least they can give their functions proper names so they are steered toward that habit.

While I have the podium may I point out that the syntax of the Bitlash language is much less weird / more compatible with C and Javascript in the 2.0 version and if you haven't given it a look in a while it might be worth dusting off. Here's the User's Guide: http://bitlash.net/bitlash-users-guide.pdf

-br

dhenry:
It doesn't provide inferior people the ability to feel otherwise.

Check out this thread: http://arduino.cc/forum/index.php/topic,146205

You may be able to advise the poster about the best way of using goto.

Disclaimer: I don't really understand what "It doesn't provide inferior people the ability to feel otherwise." means. Maybe someone else does?

No.. Nick The God dhenry has spoken it isn't for us mere mortals to understand the words or meaning, If as you say, there ever was one...

Bob

You can take away my GOTO when you can pry it out of my cold dead fingers.
It's my right! Anyone who doesn't like it can take an unconditional jump!

It's my right!

So is shooting yourself in the foot. Not recommended, though.

Next thing, they'll want background checks!

GoForSmoke:
Anyone who doesn't like it can take an unconditional jump!

Whoa, whoa. That's like a GOTO isn't it?

Suggest amendment:

if (YouDontLikeIt)
  exit (1);

GoForSmoke:
You can take away my GOTO when you can pry it out of my cold dead fingers.

Bug:
Your proposal is acceptable.

Well there does come a time in all Basic code where you just have to say NOP to GOTO's.
No, no, no! No new GOTO's!
In fact, make GOTO cuts! Cut-cut-cut!
Sign the NOR-logic pledge and join the NOP party today!

And yeah, I'm playing at something extreme here. can ya guess what?

Smoke!

Bob

fetches beer
pulls us a chair
*throws a few GOTOs into the melee, sits back and watches the show"
]:smiley: ]:smiley: ]:smiley:

I've encountered a few variations of Basic starting from mid 80's. All of them felt somehow broken and I've had to learn to work around the most serious issues.

Most recently I worked with VB6. In VB6 there is no way of resizing a dynamic array back to zero elements other than dedicating a separate unassigned array type for that purpose. If you did ReDim a(0), you'd get an array with a single element, not an empty one. Of course, ReDimming to -1 does not work either.

You can't really test does an array have zero elements either because there are only functions for finding the first and last index in the array. So, you need to write a function of your own with exception handling that would catch the case where the array has not been added any values to. That way, it'll return 0.

Localization has always provided plenty of error cases. For some reason, if you take code from one system to another, it fails, because in the other system, the decimal separator is different. String to double conversion throws an exception, funny that. At least in DotNet, you could at least make the conversions culture invariant.

It kinda supports object oriented programming, but you need to have each class in a separate file and they come with some limitations.

And I still have not found a way to "continue" a loop, so in that case, I'm forced to use a GOTO in order to skip the rest of the loop and continue with the next iteration.

For scripting, it's almost usable, and easy to debug, but I can't imagine myself writing an application in Basic. Then there are plenty of other options for scripting that easier to work with in my opinion. I haven't really been coding in any form of Basic for almost 2 years, good riddance.

good riddance.

No language (or any tool, for that matter) can do everything effectively and efficiently to everyone's satisfaction - that's why we have so many different langues / tools.

Judging a language's "inferiority" on its inability to perform a task is futile.

What's faster to cut logs with?

A flint ax?
A hatchet?
A bow saw?
A buzzsaw?

Would there be a task that I'd rather use a flint ax for that none of the others isn't better for?
Be a museum piece?