Pages: 1 2 3 [4] 5   Go Down
Author Topic: Is there a good Basic interpreter?  (Read 7715 times)
0 Members and 1 Guest are viewing this topic.
Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 47
Posts: 2925
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 98
Posts: 4813
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!



 


Logged

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 631
Posts: 50043
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
It's my right!
So is shooting yourself in the foot. Not recommended, though.
Logged

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 98
Posts: 4813
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Next thing, they'll want background checks!
Logged

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Global Moderator
Online Online
Brattain Member
*****
Karma: 495
Posts: 19032
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

Suggest amendment:

Code:
if (YouDontLikeIt)
  exit (1);
Logged


UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12630
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Quote from: Bug
Your proposal is acceptable.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 98
Posts: 4813
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?

Logged

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 47
Posts: 2925
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Smoke!

Bob
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Offline Offline
Full Member
***
Karma: 5
Posts: 113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

For whom does the clock pulse? It pulses for you!

Finland
Offline Offline
Jr. Member
**
Karma: 1
Posts: 84
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 98
Posts: 4813
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?

Logged

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Finland
Offline Offline
Jr. Member
**
Karma: 1
Posts: 84
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Full Member
***
Karma: 5
Posts: 113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Quote
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.
Logged

For whom does the clock pulse? It pulses for you!

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Pages: 1 2 3 [4] 5   Go Up
Jump to: