Is there a good Basic interpreter?

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?

dhenry:
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.

That was meant as a personal remark as in I'm happy not to be coding in this language any more. You are right, most modern languages have their place even if they had some peculiar perks that look weird if you moved from another language. One has to learn to pick the right tool for the task at hand. It's just that we didn't have much of choice in the product back then, so I grew frustrated when I learned the tool wasn't really fitting the tasks and as a result I got bugs to fix.

VB String class apparently handles character data in 64K blocks and this can result in exponential growth in execution time if you go over the bound. You can work around this too but for handling of very large text files, VB is not good at all.

Another thing that can bother a C coder. Basic interpreter evaluates all the conditions in a clause while C quits evaluating if the following conditions couldn't change the result.

I still think the language, at least VB6, is more or less broken, call that a judgement or not. However, Microsoft has later added operators like OrElse and AndAlso into later VB versions to cover the conditional operator topic. I'm sure VB as language has progressed in other topics too. I'm not this familiar with non-VB Basic interpreters.

What's better for understanding the development of humans?

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

Would there be a task that I'd rather use a buzzsaw for that none of the others would be better for?
Making a chainsaw massacre movie. All arguments can be inverted.

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.

Indeed, and how many offerings of C do we have?
No language is written to create bad code! The goto was put there for good reason, and that was not to provide a method for making spaghetti. Just as it was in C!
Our understanding of what is considered to be good code has developed over time.
IMO it isn't the job of a language to impose structure, the language should be open and flexible. Maybe that is why I like assembler so much, the quality of the finished code is purely down to me. It's more than writing code, it's competition, a game, a challenge that I enjoy.
And as I said below, anyone can write "bad" or sloppy code, even, yes even on the Arduino, just take a look though these annals.
One has to separate the vagrancies of the workman from his tools before casting judgement from on high.

One has to separate the vagrancies of the workman from his tools before casting judgement from on high.

Right on. As they say, only incompetent carpenters blame their tools.

dhenry:

One has to separate the vagrancies of the workman from his tools before casting judgement from on high.

Right on. As they say, only incompetent carpenters blame their tools.

Quite right. Competent carpenters choose the best tool for the job. Which I expect you'd find is why Basic is so rarely used for professional software development these days.

PeterH:

dhenry:

One has to separate the vagrancies of the workman from his tools before casting judgement from on high.

Right on. As they say, only incompetent carpenters blame their tools.

Quite right. Competent carpenters choose the best tool for the job. Which I expect you'd find is why Basic is so rarely used for professional software development these days.

Next thing you know we'll be telling people they should cook their food. Ugg.