ScriptBasic

Support => Installation => Topic started by: Jmcbride on August 06, 2016, 03:08:51 pm

Title: Compiling ScriptBasic 2.1.0 on a modern Linux
Post by: Jmcbride on August 06, 2016, 03:08:51 pm
I finally got what I thought was a clean compile and install of scribasic 2.1.0. However, I'm seeing this when executing the example programs. Is 2.2.0 less buggy?

spike examples # scriba array.bas
array.bas(1): error &H77:syntax error during checking the line and also noting that the syntax error so serious that none of the other syntax defintions can match the current line
Title: Re: Compiling ScriptBasic 2.1.0 on a modern Linux
Post by: Support on August 06, 2016, 07:32:05 pm
Please post the code to array.bas.

I'll be happy to take a peek and see what might be the problem.

Quote
Is 2.2.0 less buggy

Script BASIC has been production stable for over 10 years with no known bugs. I think you should look closer at your code.

FYI: Script BASIC will not execute faulty syntax/code and returns an error code instead.
Title: Re: Compiling ScriptBasic 2.1.0 on a modern Linux
Post by: Jmcbride on August 07, 2016, 08:04:36 pm
To save server storage space. The source code you request in in the examples directory.  Is there a download link for the 2.2 sources somewhere?

Jerry
Title: Re: Compiling ScriptBasic 2.1.0 on a modern Linux
Post by: Support on August 08, 2016, 01:16:14 am
Jerry,

The array.bas example that I inherited with the 2.1 release from Peter Verhas seems to work as intended under Ubuntu 14.04 64 bit. I added a couple newlines for clarity.

a[5,3]=4
c = a[5]
print a[5,3],"\n",c,"\n"
 

jrs@laptop:~/sb/source/examples$ scriba array.bas
4
ARRAY@#00A706C8
jrs@laptop:~/sb/source/examples$


Something more fun.


a[1000000,1]="one"
a[1000000,2]="two"
a[1000000,3]="three"

REF b = a[1000000]

PRINT "Simple as ",b[1],", ",b[2],", ",b[3],". (million)\n"

b[1] = 1
b[2] = 2
b[3] = 3

PRINT a[1000000,1] + a[1000000,2] + a[1000000,3],"\n"
 

jrs@laptop:~/sb/sb22/test$ time scriba reftest.sb
Simple as one, two, three. (million)
6

real   0m0.004s
user   0m0.004s
sys   0m0.000s
jrs@laptop:~/sb/sb22/test$

Title: Re: Compiling ScriptBasic 2.1.0 on a modern Linux
Post by: Jmcbride on August 10, 2016, 01:26:35 am
Well. I guess at this juncture it's time for me to move on. Thank for the help and the 2.2 sources. 
Good bye. 
Title: Re: Compiling ScriptBasic 2.1.0 on a modern Linux
Post by: Support on August 10, 2016, 05:49:00 am
No problem, glad I could help.