Armando and I were able to build a version of ScriptBasic for Ubuntu 10.10 64 bit.
This version of ScriptBasic includes the additional math functions Tom contributed.
This package will install ScriptBasic's dependencies if they are not present.
sudo gdebi scriba-v2.1.1_amd64.deb -
Installsudo apt-get remove scriba -
RemoveHere is the ScriptBasic source directory I used to build the runtime and install .deb file.
scriba-v2.1.1-src_amd64.tar.zScriptBasic Online DocumentationScriptBasic 64 is a powerful scripting language/API that is easy to use and takes less code to get the job done.
Large Numbersa = 9000000000000000000 / 2
PRINT a,"\n"
$ scriba biglong.sb
4500000000000000000
New Math FunctionsThe following 8 functions accept radians as their argument, so we use the
new RAD() function to convert 34 degrees to 5.934119e-01 (0.593412) radians.
Tangent Cotangent Secant Cosecant
TAN() COTAN() SECANT() COSECANT()
6.745085e-01 1.482561e+00 1.206218e+00 1.788292e+00
0.674509 1.482561 1.206218 1.788292
Arctangent Arccotangent Arcsecant Arccosecant
ATAN() ACTAN() ASECANT() ACOSECANT()
5.934119e-01 5.934119e-01 5.934119e-01 5.934119e-01
0.593412 0.593412 0.593412 0.593412
There are 6 Hyperbolic functions. They also accept radian arguments.
H-Sine H-Cosine H-Tangent
HSIN() HCOS() HTAN()
6.288574e-01 1.181297e+00 5.323451e-01
0.628857 1.181297 0.532345
H-Secant H-Cosecant H-Cotangent
HSECANT() HCOSECANT() HCTAN()
8.465274e-01 1.590186e+00 1.878481e+00
0.846527 1.590186 1.878481
Large Stringsa = string(100000000," ") & "John" & string(100000000," ")
PRINT INSTR(a,"John"),"\n"
$ scriba biginstr.sb
100000001
Easy Database Accesssbdb:test' MySQL Test Program
INCLUDE mysql.bas
dbh = mysql::RealConnect("localhost","USER","PSWD","sbdb")
mysql::query(dbh,"SELECT * FROM test")
WHILE mysql::FetchHash(dbh,column)
PRINTNL
PRINT column{"ID"},"\n"
PRINT column{"NAME"},"\n"
PRINTNL
WEND
PRINTNL
PRINT "The database handle is: ",dbh,"\n"
PRINT "Affected rows by SELECT: ",mysql::AffectedRows(dbh),"\n"
PRINT "Character set name is: ",mysql::CharacterSetName(dbh),"\n"
PRINT "Last error is: ",mysql::ErrorMessage(dbh),"\n"
PRINT "Client info is: ",mysql::GetClientInfo(),"\n"
PRINT "Host info is: ",mysql::GetHostInfo(dbh),"\n"
PRINT "Proto info is: ",mysql::GetProtoInfo(dbh),"\n"
PRINT "Server info is: ",mysql::GetServerInfo(dbh),"\n"
PRINT "PING result: ",mysql::Ping(dbh),"\n"
PRINT "Thread ID: ",mysql::ThreadId(dbh),"\n"
PRINT "Status is: ",mysql::Stat(dbh),"\n"
mysql::Close(dbh)
END
$ scriba testmysql.sb
1
John Spikowski
The database handle is: 1
Affected rows by SELECT: 1
Character set name is: latin1
Last error is:
Client info is: 5.1.49
Host info is: Localhost via UNIX socket
Proto info is: 10
Server info is: 5.1.49-1ubuntu8.1
PING result: -1
Thread ID: 0
Status is: Uptime: 194893 Threads: 1 Questions: 2043 Slow queries: 0 Opens: 200 Flush tables: 1 Open tables: 64 Queries per second avg: 0.10
Network/Internet AccessThis cURL extension module example downloads the ScriptBasic logo from it's project site.
IMPORT curl.bas
ch = curl::init()
curl::option(ch,"URL","http://scriptbasic.org/logo.png")
curl::option(ch,"FILE","sb_logo.png")
curl::perform(ch)
curl::finish(ch)
If programming for the web is your thing, ScriptBasic includes a multi-threaded application proxy server to run your GCI scripts with in memory session support with enhanced security safeguards. (files located outside of web root, .htaccess authorization caching, connection pooling with ODBC, real {binary format} programs and not embedded parsed HTML text scripts like php)
Feedback appreciated!