Open Forum > What's New

ScriptBasic 3.0 Open Items

<< < (3/6) > >>

Support:
That's great news Tom!

Do you have any SB script(s) you used to test this with?

Can you post (as an attachment) the files you changed and any notes you wish to share?

I would be happy to test and create a new Ubuntu build for testing. If your doing this on Windows, creating a scriba.exe for folks to test with would be great.

I'm in the process of setting up a developers site only that will give us online source editing, FTP, MySQL DB, console mode access and source control options. (level of access will increase as one becomes more involved in the project)

John

mesbas:
Sorry! I don't do windows development.
I'm still trying to get cygwin working on my windows 7 box, but it's really not a priority.

I've attached the 4 files that were modified.
They're big files, that developers site or diff files for patching, would be easier ways to go.

Put notimp.h, syntax.h and syntax.def into the scriptbasic directory.
Put mathfunc.c into the scriptbasic/commands directory.
I only modified the base files, so syntaxer.pl has to be run to create syntax.c and notimp.c.
After that, from the source directory of an already installed and working scriptbasic, I only do:
    make clean
    make
    ./install.sh

I'm doing this on Fedora release 14 running kernel 2.6.35 on an x86_64 processor.
Depending on your OS or something else, you may have to do it differently.

mesbas:
Because of the 4 file attachment limit, the SB test program is included here.

Everything works fine for me.  I was able to compile the test program into an executable.

This is a first for me, so lets hope there arn't many problems.

Support:
Thanks Tom for the help with ScriptBasic. I understand your reluctance to invest any time with Windows. I have only visited my Windows XP partition twice in the last few months. It becomes obvious that Windows is a bloated kludge with more layers than an onion. Linux just works and I'm not always pulling out my wallet to upgrade a package or pay for another year of subscription services. I hope Microsoft wakes up to the fact that their screwed knowing that people have an option outside their monopoly. I posted your MathTest script so others can get an idea what your enhancements bring to the table. My plan over the next month or so is to put in place a solid source control system. I'm still looking at all the options. I don't want to do this more than once.


--- Code: ---'
' Given the starting value of 34 degrees, calculate radians.
' Given the radian value, calculate TAN, COTAN, SECANT and COSECANT.
' Given the TAN, COTAN, SECANT and COSECANT values,
' calculate the ATAN, ACTAN, ASECANT and ACOSECANT.
'
degval = 34
radval = RAD(degval)
zerval = 0

tanval = TAN(radval)
cotval = COTAN(radval)
secval = SECANT(radval)
cseval = COSECANT(radval)

ataval = ATAN(tanval)
actval = ACTAN(cotval)
aseval = ASECANT(secval)
acoval = ACOSECANT(cseval)

hsinv = HSIN(radval)
hcosv = HCOS(radval)
htanv = HTAN(radval)
hsecv = HSECANT(radval)
hcosc = HCOSECANT(radval)
hcotv = HCTAN(radval)

print "\nThe following 8 functions accept radians as their argument, so we "
print "use the\nnew RAD() function to convert ",degval," degrees to ",radval," (",str$(radval),") radians.\n\n"

print "Tangent\t\tCotangent\tSecant\t\tCosecant\n"
print "TAN()  \t\tCOTAN()  \tSECANT()    \tCOSECANT()\n"
print tanval," \t",cotval,"\t",secval," \t",cseval,"\n"
print str$(tanval)," \t",str$(cotval)," \t",str$(secval)," \t",str$(cseval),"\n\n"

print "Arctangent\tArccotangent\tArcsecant\tArccosecant\n"
print "ATAN()    \tACTAN()  \tASECANT()\tACOSECANT()\n"
print ataval," \t",actval," \t",aseval," \t",acoval,"\n"
print str$(ataval)," \t",str$(actval)," \t",str$(aseval)," \t",str$(acoval),"\n\n"

print "There are 6 Hyperbolic functions. They also accept radian arguments.\n\n"
print "H-Sine\t\tH-Cosine\tH-Tangent\n"
print "HSIN()\t\tHCOS()  \tHTAN()\n"
print hsinv," \t",hcosv," \t",htanv,"\n"
print str$(hsinv)," \t",str$(hcosv)," \t",str$(htanv),"\n\n"

print "H-Secant\tH-Cosecant\tH-Cotangent\n"
print "HSECANT()\tHCOSECANT()\tHCTAN()\n"
print hsecv," \t",hcosc," \t",hcotv,"\n"
print str$(hsecv)," \t",str$(hcosc)," \t",str$(hcotv),"\n\n"

--- End code ---

Support:
Tom,

Scriba is giving me a segmentation fault with any script I run. I followed your instructions in your post.

Is there any chance you use something 64 bit specific? (running Ubuntu 32 bit here)

I'm able to get the command line options if I don't pass a script and -D and -v both work. I didn't see any warnings or errors with the make.

John


--- Code: ---root@Laptop:/usr/src/scriptbasic# perl syntaxer.pl
root@Laptop:/usr/src/scriptbasic# make clean
rm -rf bin/exe/*
rm -rf bin/include/*
rm -rf bin/lib/*
rm -rf bin/make/*
rm -rf bin/obj/*
rm -rf bin/var/*
root@Laptop:/usr/src/scriptbasic# make
gcc  -w -c -o bin/obj/basext.o basext.c
gcc  -w -c -o bin/obj/builder.o builder.c
gcc  -w -c -o bin/obj/buildnum.o buildnum.c
gcc  -w -c -o bin/obj/confpile.o confpile.c
gcc  -w -c -o bin/obj/conftree.o conftree.c
gcc  -w -c -o bin/obj/dynlolib.o dynlolib.c
gcc  -w -c -o bin/obj/epreproc.o epreproc.c
gcc  -w -c -o bin/obj/errcodes.o errcodes.c
gcc  -w -c -o bin/obj/execute.o execute.c
gcc  -w -c -o bin/obj/expression.o expression.c
gcc  -w -c -o bin/obj/filesys.o filesys.c
gcc  -w -c -o bin/obj/getopt.o getopt.c
gcc  -w -c -o bin/obj/hndlptr.o hndlptr.c
gcc  -w -c -o bin/obj/hookers.o hookers.c
gcc  -w -c -o bin/obj/httpd.o httpd.c
gcc  -w -c -o bin/obj/ipreproc.o ipreproc.c
gcc  -w -c -o bin/obj/lexer.o lexer.c
gcc  -w -c -o bin/obj/logger.o logger.c
gcc  -w -c -o bin/obj/lsp.o lsp.c
gcc  -w -c -o bin/obj/match.o match.c
gcc  -w -c -o bin/obj/memory.o memory.c
gcc  -w -c -o bin/obj/modumana.o modumana.c
gcc  -w -c -o bin/obj/myalloc.o myalloc.c
gcc  -w -c -o bin/obj/mygmtime.o mygmtime.c
gcc  -w -c -o bin/obj/options.o options.c
gcc  -w -c -o bin/obj/reader.o reader.c
gcc  -w -c -o bin/obj/report.o report.c
gcc  -w -c -o bin/obj/scriba.o scriba.c
gcc  -w -c -o bin/obj/sym.o sym.c
gcc  -w -c -o bin/obj/syntax.o syntax.c
gcc  -w -c -o bin/obj/thread.o thread.c
gcc  -w -c -o bin/obj/uniqfnam.o uniqfnam.c
gcc  -w -c -o bin/obj/md5.o md5.c
gcc  -w -c -o bin/obj/environ.o commands/environ.c
gcc  -w -c -o bin/obj/external.o commands/external.c
gcc  -w -c -o bin/obj/extops.o commands/extops.c
gcc  -w -c -o bin/obj/file.o commands/file.c
gcc  -w -c -o bin/obj/function.o commands/function.c
gcc  -w -c -o bin/obj/goto.o commands/goto.c
gcc  -w -c -o bin/obj/if.o commands/if.c
gcc  -w -c -o bin/obj/let.o commands/let.c
gcc  -w -c -o bin/obj/mathfunc.o commands/mathfunc.c
gcc  -w -c -o bin/obj/mathops.o commands/mathops.c
gcc  -w -c -o bin/obj/print.o commands/print.c
gcc  -w -c -o bin/obj/string.o commands/string.c
gcc  -w -c -o bin/obj/time.o commands/time.c
gcc  -w -c -o bin/obj/while.o commands/while.c
ar -r bin/lib/lscriba.a  bin/obj/basext.o bin/obj/builder.o bin/obj/buildnum.o bin/obj/confpile.o bin/obj/conftree.o bin/obj/dynlolib.o bin/obj/epreproc.o bin/obj/errcodes.o bin/obj/execute.o bin/obj/expression.o bin/obj/filesys.o bin/obj/getopt.o bin/obj/hndlptr.o bin/obj/hookers.o bin/obj/httpd.o bin/obj/ipreproc.o bin/obj/lexer.o bin/obj/logger.o bin/obj/lsp.o bin/obj/match.o bin/obj/memory.o bin/obj/modumana.o bin/obj/myalloc.o bin/obj/mygmtime.o bin/obj/options.o  bin/obj/reader.o bin/obj/report.o bin/obj/scriba.o bin/obj/sym.o bin/obj/syntax.o bin/obj/thread.o bin/obj/uniqfnam.o bin/obj/md5.o bin/obj/environ.o bin/obj/external.o bin/obj/extops.o bin/obj/file.o bin/obj/function.o bin/obj/goto.o bin/obj/if.o bin/obj/let.o bin/obj/mathfunc.o bin/obj/mathops.o bin/obj/print.o bin/obj/string.o bin/obj/time.o bin/obj/while.o
ar: creating bin/lib/lscriba.a
mkdir bin/var/standard || echo
gcc  -w -c -o bin/var/standard/scribacmd.o variations/standard/scribacmd.c
gcc  -w -c -o bin/obj/lmt_none.o lmt_none.c
gcc  -w -o bin/exe/scriba bin/var/standard/scribacmd.o bin/obj/lmt_none.o bin/lib/lscriba.a -lc -lm -ldl -lpthread
bin/exe/scriba -v
ScriptBasic v2.1
Variation >>STANDARD<< build 1
Magic value 859002424
Node size is 16
Extension interface version is 11
Compilation: Jan  8 2011 02:01:00
mkdir bin/var/httpd || echo
gcc  -w -c -o bin/var/httpd/websrv.o variations/httpd/websrv.c
mkdir bin/var/httpd || echo
mkdir: cannot create directory `bin/var/httpd': File exists

gcc  -w -c -o bin/var/httpd/service.o variations/httpd/service.c
gcc  -w -o bin/exe/sbhttpd bin/var/httpd/websrv.o bin/var/httpd/service.o bin/obj/lmt_none.o bin/lib/lscriba.a -lc -lm -ldl -lpthread
gcc  -w -c -o bin/obj/stndlone.o stndlone.c
ar -r bin/lib/libscriba.a  bin/obj/basext.o bin/obj/builder.o bin/obj/buildnum.o bin/obj/confpile.o bin/obj/conftree.o bin/obj/dynlolib.o bin/obj/epreproc.o bin/obj/errcodes.o bin/obj/execute.o bin/obj/expression.o bin/obj/filesys.o bin/obj/getopt.o bin/obj/hndlptr.o bin/obj/hookers.o bin/obj/httpd.o bin/obj/ipreproc.o bin/obj/lexer.o bin/obj/logger.o bin/obj/lsp.o bin/obj/match.o bin/obj/memory.o bin/obj/modumana.o bin/obj/myalloc.o bin/obj/mygmtime.o bin/obj/options.o  bin/obj/reader.o bin/obj/report.o bin/obj/scriba.o bin/obj/sym.o bin/obj/syntax.o bin/obj/thread.o bin/obj/uniqfnam.o bin/obj/md5.o bin/obj/environ.o bin/obj/external.o bin/obj/extops.o bin/obj/file.o bin/obj/function.o bin/obj/goto.o bin/obj/if.o bin/obj/let.o bin/obj/mathfunc.o bin/obj/mathops.o bin/obj/print.o bin/obj/string.o bin/obj/time.o bin/obj/while.o bin/obj/stndlone.o
ar: creating bin/lib/libscriba.a
ld -shared -o bin/lib/libscriba.so  bin/obj/basext.o bin/obj/builder.o bin/obj/buildnum.o bin/obj/confpile.o bin/obj/conftree.o bin/obj/dynlolib.o bin/obj/epreproc.o bin/obj/errcodes.o bin/obj/execute.o bin/obj/expression.o bin/obj/filesys.o bin/obj/getopt.o bin/obj/hndlptr.o bin/obj/hookers.o bin/obj/httpd.o bin/obj/ipreproc.o bin/obj/lexer.o bin/obj/logger.o bin/obj/lsp.o bin/obj/match.o bin/obj/memory.o bin/obj/modumana.o bin/obj/myalloc.o bin/obj/mygmtime.o bin/obj/options.o  bin/obj/reader.o bin/obj/report.o bin/obj/scriba.o bin/obj/sym.o bin/obj/syntax.o bin/obj/thread.o bin/obj/uniqfnam.o bin/obj/md5.o bin/obj/environ.o bin/obj/external.o bin/obj/extops.o bin/obj/file.o bin/obj/function.o bin/obj/goto.o bin/obj/if.o bin/obj/let.o bin/obj/mathfunc.o bin/obj/mathops.o bin/obj/print.o bin/obj/string.o bin/obj/time.o bin/obj/while.o bin/obj/lmt_none.o -lc -lm -ldl -lpthread
root@Laptop:/usr/src/scriptbasic# cd bin/exe
root@Laptop:/usr/src/scriptbasic/bin/exe# ls -l
total 1020
-rwxr-xr-x 1 root jrs 529394 2011-01-08 02:01 sbhttpd
-rwxr-xr-x 1 root jrs 507943 2011-01-08 02:01 scriba
root@Laptop:/usr/src/scriptbasic/bin/exe# mv /usr/bin/scriba /usr/bin/scriba-2.1
root@Laptop:/usr/src/scriptbasic/bin/exe# mv /usr/bin/sbhttpd /usr/bin/sbhttpd-2.1
root@Laptop:/usr/src/scriptbasic/bin/exe# cp scriba /usr/bin
root@Laptop:/usr/src/scriptbasic/bin/exe# cp sbhttpd /usr/bin
root@Laptop:/usr/src/scriptbasic/bin/exe# exit
logout
jrs@Laptop:~$ cd SB/test
jrs@Laptop:~/SB/test$ scriba -v
ScriptBasic v2.1
Variation >>STANDARD<< build 1
Magic value 859002424
Node size is 16
Extension interface version is 11
Compilation: Jan  8 2011 02:01:00
jrs@Laptop:~/SB/test$ scriba MathTest.bas
Segmentation fault
jrs@Laptop:~/SB/test$

--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version