• Welcome to Theos PowerBasic Museum 2017.

Help - Have I overlooked something this basic for years?

Started by Carlo Pagani, August 09, 2013, 03:53:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

John Spikowski

QuoteIn your case it's even worse, because you don't even use PB. You're just looking for the slightest ocassion to bash it.  Really tedious.

I show a like example in SB that works and you say all I care about is bashing PB. That's easy for you to say seeing the HUGE investment you have in PB. I think your job of covering Bob's ass is over. There is only so much you can do with include files.


José Roca

Your example is not equivalent. I guess that SB is using doubles and doing the math using double precission, so there is not a mix of different precisions. Does SB support extended floating point? Does it support currency and extended currency?

John Spikowski

#17
QuoteYour example is not equivalent.

Equivalent meaning not as fast or does PB have a new way of doing addition and subtraction?

These are better questions to ask Charles of OxygenBasic (apples vs apples) as SB is an interpreter and takes care of all the low level stuff giving the user a traditional BASIC experience.

ScriptBasic numbers documentation

Rod Macia

Quote from: John Spikowski on August 10, 2013, 09:34:50 PM
QuoteYour example is not equivalent.

Equivalent meaning not as fast or does PB have a new way of doing addition and subtraction?

These are better questions to ask Charles of OxygenBasic (apples vs apples) as SB is an interpreter and takes care of all the low level stuff giving the user a traditional BASIC experience.

ScriptBasic numbers documentation
Not equivalent because you did not define your Variables in SB as Extended Currency. (Can You?)
See PB sample in post #1
DIM Test(3) AS STATIC CUX

You ask Charles.
You used ScriptBasic to prove a point.
You concluded that SB was working and PB was not.
Your Scriptbasic sample does not use CUX or equivalent. Therefore not same test. Probably using Double based on your SB doc link.
If you use DIM Test(3) AS STATIC DOUBLE   or DIM Test(3) AS STATIC EXT it also works in PB as expected.
as far as I'm concern Aslan's post an Jose's explanation made very clear to me.

The fact that a compiler does not interpret our instructions the way we thought it should, does not make the compiler wrong, it more than likely makes our interpretation of what it should be doing wrong.

Quote from: John Spikowski on August 10, 2013, 08:18:55 PM
Just another example of PowerBASIC as a high level language coming up short trying to be something it's not. IMHO


If your conclusion is based on this thread, and your Flawed comparison. Then your conclusion is wrong.




John Spikowski

#19
QuoteNot equivalent because you did not define your Variables in SB as Extended Currency.

ScriptBasic doesn't require the user to DIM or DECLARE the variables it uses. The language doesn't have type definitions only the data has type significance and is evaluated at the time it's being used.

Example:

a = 1
b = "2"
PRINT a + b,"\n"
PRINT a & b,"\n"

Results

3
12

If I have to declare and dimension everything, I might as well use C.



Theo Gottwald

We should not start to compare Interpreters with real compilers.
Script Basic is an interpreter and as such has its advantages and disadvantages.
At the same time a compiler has otehr goals.
If you compile something your target is maximum speed, the result is possibly a datatype conversion to CPU internal datatypa - what we see here. If i write a script language i just stay within the highes precision, because nobody will expect best performance from an interpreting language. Just that it works in any way. Therefore we should not compare two diffrent kind of things.
Please keep the discussions on interpreting languages in the sub forum for that or else i need to make a cleanup of the postings.
Because we have already solved the problem here - Jose explained it - and there is no need to mix oil into the water here.
People may have to read the sollution for this prioblem, it should be easy to find. Academic discussions should be at other places.
@John: Open another post in the Scriptbasic forum IF you see a there a real topic/advantage.

Guy Dombrowski

Quote
If I have to declare and dimension everything, I might as well use C.

John, with PBCC you do not have to declare and dimension your variables and strings but only Arrays.
Just use DEFLNG A-Z and you can use anything you want anywhere you like.

Theo Gottwald

A good point. And in earlier times, we had interpreters because a compiler needed 1 second per lin of code.
As PB "compiles with no significant delay", a script languages has ti have some special optimizations to make sense.
How about the Basic from Eros ....what was the name? Is it still developed?
I am sure he will also add optimizations that it can be used for special purposes.

Edwin Knoppert

>Just use DEFLNG A-Z and you can use anything you want anywhere you like.

Ok, where is the tree to hang people?

>:(

John Spikowski

#24
QuoteOk, where is the tree to hang people?

You are welcome to the stake I'm being roasted on when the friends of the forum are done with me if that helps.

Theo Gottwald

From my standpoint, there are still places where script languages make sense.
We have now quite a lot of them around.
On the other side - as said- i do not see their use primarily for developing applications.
I also personally do not like JAVA Apps so much.
I see their use in daily automation-scripting. Compilers  ... make applications.
Of course we can twist and move usages here around and find reasons.
If i develop a script language, it may make sense that at the same time, i show people what its good for.
For example in YouTube. How about you John?
How about a good video, that introduces people to your new born Scripting language?