ScriptBasic
Encyclopedia
ScriptBasic is a scripting language
Scripting language
A scripting language, script language, or extension language is a programming language that allows control of one or more applications. "Scripts" are distinct from the core code of the application, as they are usually written in a different language and are often created or at least modified by the...

 variant of BASIC. The source of the interpreter is available as a C program
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

 under the LGPL
GNU Lesser General Public License
The GNU Lesser General Public License or LGPL is a free software license published by the Free Software Foundation . It was designed as a compromise between the strong-copyleft GNU General Public License or GPL and permissive licenses such as the BSD licenses and the MIT License...

 license.

ScriptBasic generates intermediary code which is then interpreted by a runtime environment. ScriptBasic is available for Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

, Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

 and Mac OS X and may be embedded in other programs as well. It can create standalone executable
Executable
In computing, an executable file causes a computer "to perform indicated tasks according to encoded instructions," as opposed to a data file that must be parsed by a program to be meaningful. These instructions are traditionally machine code instructions for a physical CPU...

 files. A runtime library is linked into the executable. It is available in precompiled binaries (setup.exe under Windows and uninstall also supported), dpkg
Dpkg
dpkg is the software at the base of the Debian package management system. dpkg is used to install, remove, and provide information about .deb packages....

 and rpm
RPM Package Manager
RPM Package Manager is a package management system. The name RPM variously refers to the .rpm file format, files in this format, software packaged in such files, and the package manager itself...

 for Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

 and in source code form. The language, the interpreter is fully documented in the Users' Guide available in text, HTML
HTML
HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....

, CHM
CHM
-Museums:* Chicago History Museum, founded in 1856 to study and interpret Chicago's history* Computer History Museum, established in 1996 in Mountain View, California, dedicated to preserving and presenting the stories and artifacts of the information age, and exploring the computing revolution and...

, TeX
TeX
TeX is a typesetting system designed and mostly written by Donald Knuth and released in 1978. Within the typesetting system, its name is formatted as ....

, texi and PDF
Portable Document Format
Portable Document Format is an open standard for document exchange. This file format, created by Adobe Systems in 1993, is used for representing documents in a manner independent of application software, hardware, and operating systems....

 formats.

ScriptBasic has been developed since 1999 and has reached a fairly matured state in terms of functions and stability. The precompiled version available for Windows and Linux includes a command line version and a standalone web server
Web server
Web server can refer to either the hardware or the software that helps to deliver content that can be accessed through the Internet....

.

This BASIC can be the choice for developers, who seek a BASIC variant that runs on UNIX as well as under Windows and Mac OS X (Intel). The Basic is embeddable with an option to compile your applications to a small footprint executable.

ScriptBasic has an open interface for module developers. There are several external modules developed by the developer of ScriptBasic as well as by other developers. These include data base connection handling for various database systems (MySQL
MySQL
MySQL officially, but also commonly "My Sequel") is a relational database management system that runs as a server providing multi-user access to a number of databases. It is named after developer Michael Widenius' daughter, My...

, PostgreSQL
PostgreSQL
PostgreSQL, often simply Postgres, is an object-relational database management system available for many platforms including Linux, FreeBSD, Solaris, MS Windows and Mac OS X. It is released under the PostgreSQL License, which is an MIT-style license, and is thus free and open source software...

, ODBC, Berkeley DB
Berkeley DB
Berkeley DB is a computer software library that provides a high-performance embedded database for key/value data. Berkeley DB is a programmatic software library written in C with API bindings for C++, PHP, Java, Perl, Python, Ruby, Tcl, Smalltalk, and most other programming languages...

 and others), binding to the library CURL
CURL
cURL is a computer software project providing a library and command-line tool for transferring data using various protocols. The cURL project produces two products, libcurl and cURL...

, PNG graphics, GTK+
GTK+
GTK+ is a cross-platform widget toolkit for creating graphical user interfaces. It is licensed under the terms of the GNU LGPL, allowing both free and proprietary software to use it. It is one of the most popular toolkits for the X Window System, along with Qt.The name GTK+ originates from GTK;...

 graphical user interface
Graphical user interface
In computing, a graphical user interface is a type of user interface that allows users to interact with electronic devices with images rather than text commands. GUIs can be used in computers, hand-held devices such as MP3 players, portable media players or gaming devices, household appliances and...

, sockets
Internet socket
In computer networking, an Internet socket or network socket is an endpoint of a bidirectional inter-process communication flow across an Internet Protocol-based computer network, such as the Internet....

, regular expression
Regular expression
In computing, a regular expression provides a concise and flexible means for "matching" strings of text, such as particular characters, words, or patterns of characters. Abbreviations for "regular expression" include "regex" and "regexp"...

s, thread
Thread (computer science)
In computer science, a thread of execution is the smallest unit of processing that can be scheduled by an operating system. The implementation of threads and processes differs from one operating system to another, but in most cases, a thread is contained inside a process...

 support, data compression
Data compression
In computer science and information theory, data compression, source coding or bit-rate reduction is the process of encoding information using fewer bits than the original representation would use....

 and CGI
Common Gateway Interface
The Common Gateway Interface is a standard method for web servers software to delegate the generation of web pages to executable files...

.

ScriptBasic also has an open interface for preprocessor
Preprocessor
In computer science, a preprocessor is a program that processes its input data to produce output that is used as input to another program. The output is said to be a preprocessed form of the input data, which is often used by some subsequent programs like compilers...

 developers. These are modules that may act not only during run-time but also compile time, thus making it possible to alter the language. Currently there is a single preprocessor that delivers debugger
Debugger
A debugger or debugging tool is a computer program that is used to test and debug other programs . The code to be examined might alternatively be running on an instruction set simulator , a technique that allows great power in its ability to halt when specific conditions are encountered but which...

 functionality. This lets the BASIC programmer to run the BASIC program line by line, examine variable contents, set break points and all the usual debugging features. This debugger supports not only the command line version but also the web server implementation allowing full interactive debugging of CGI applications in BASIC.

The architecture of the interpreter internally is object oriented and provides a clean and well documented interface to embed the interpreter into any application written in C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

 or C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

. The whole source code is extensively documented and commented, which is an outstanding feature compared to other embeddable script language implementations. Slides in HTML format with English narration in RealAudio
RealAudio
RealAudio is a proprietary audio format developed by RealNetworks and first released in April 1995. It uses a variety of audio codecs, ranging from low-bitrate formats that can be used over dialup modems, to high-fidelity formats for music. It can also be used as a streaming audio format, that is...

 format are also available to get a jump start learning the architecture and module, preprocessor and embedding developments.

ScriptBasic is supported by a forum.

Features

  • Open source LGPL project
  • Multi-platform (Windows, Linux, Unix, Mac OS X, ...)
  • Fast multi-threaded ScriptBasic HTTP application server
  • In memory session handling
  • Extension module API (CGI, MySQL, ODBC, Berkeley DB, GTK, Curl, ...)
  • HTML template file support
  • Command line interpreter for utility applications and standard CGI programming
  • Create standalone executables without compiling (This bundles the interpreter and code together into an executable file)
  • Name space support
  • Relaxed / auto variable typing (forget DIM and think undef)
  • TYPE, ISARRAY, ISSTRING, ISINTEGER, ISREAL, ISNUMERIC, ISDEF, ISUNDEF, ISEMPTY
    Is functions
    The Is functions are a set of functions in Microsoft's Visual Basic 6, Visual Basic for Applications, VBScript, and Visual Basic .NET...

  • Associative arrays (reference elements by name - MySQL & ODBC modules assign columns to named arrays)
  • Standard branching syntax (GOTO
    Goto
    goto is a statement found in many computer programming languages. It is a combination of the English words go and to. It performs a one-way transfer of control to another line of code; in contrast a function call normally returns control...

    , GOSUB
    GOSUB
    GOSUB is a command in many versions of the BASIC computer programming language. A GOSUB statement jumps to a line elsewhere in the program. That line and the following lines up to a RETURN are used as a simple kind of a subroutine without parameters or local variables.The GOSUB command may be used...

    /RETURN
    Return statement
    In computer programming, a return statement causes execution to leave the current subroutine and resume at the point in the code immediately after where the subroutine was called, known as its return address. The return address is saved, usually on the process's call stack, as part of the operation...

    , FOR/NEXT
    For loop
    In computer science a for loop is a programming language statement which allows code to be repeatedly executed. A for loop is classified as an iteration statement....

    , DO/WHILE/UNTIL, REPEAT/UNTIL, CALL)
  • Multi-function IO directives ([LINE] INPUT, PRINT, OPEN - files, ports, standard IO)
  • Time/Date formatting and math
  • Extended string functions (REPLACE, SPLIT, SPLITA)
  • GTK / Glade support for desktop application development
  • Easy to learn and use without prior programming knowledge

External links

  • http://www.scriptbasic.org/ — ScriptBasic open source project site. (forum and wiki)
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK