Liberty BASIC
Encyclopedia
Liberty BASIC is a commercial computer
programming language
and integrated development environment
(IDE). It has an interpreter
developed in Smalltalk
, which recognizes its own dialect
of the BASIC
programming language. It runs on 16-
and 32-bit
Windows
and OS/2
.
Liberty BASIC has been used in examples of code for various guides and references about programming
in Windows, including "Beginning Programming For Dummies", by Wallace Wang.
Though Liberty BASIC has its share of limitations in its design for advanced programming, it makes a credible and very usable introductory integrated development environment, IDE, for moderate to advanced users of Windows and OS/2. DLL
s are available with functions allowing users to overcome most of the limitations in Liberty BASIC. The OS/2 version is very old, but free. A new version that will run on Windows, Macintosh and Linux
is in active development.
The Liberty BASIC dialect, and IDE, have developed a market niche for introductory and intermediate programmers who are learning the skills of programming, though it has been less widely adopted as a commercial publishing product. This does not mean that Liberty Basic is educational software
only. It is still a commercial product, and can be used to create proprietary software
.
In its current version, it runs only on Microsoft Windows
, but version 5 is in active development and runs on Mac OS X
and Linux systems as well.
Liberty Basic is not a true compiler
. Liberty Basic translates the code written in the IDE to an encrypted (not 'tokenized') file with the extension "tkn". This file is then interpreted by an executable file that carries the same file name, although this may change with the release of version 5.
BASICs that run in console mode, using a default "main window" that displays formatted text and accepts user input. It also supports GUI
-based event-driven programming using several types of windows that may contain the standard controls such as buttons, menus, textboxes, etc.
A central idea in creating Liberty BASIC was to model the handling of windows after the syntax
for file handling. For example, (from the Liberty BASIC Help File):
"The OPEN command opens communication with a device, which can be a disk file, a window, a dynamic link library or a serial communications port."
This general purpose syntax is one of the features of LB that make it easier to learn.
Once a “device” is open, data and also commands to control that device can be “printed” to it. For each type of device there is a set of commands which can be sent to it in this way. In the more recent versions of LB the word "print" may be dropped from the "print" statement, making the syntax even simpler.
Simplicity has been at the heart of Liberty BASIC from the beginning. This makes it easier to learn but at some cost, perhaps, in limiting functionality. Only two data types are supported in LB4.03: numeric and string. No type declarations are required: any variable with a $ sign at the end of its name is a string variable; otherwise it is numeric. (The plan for LB5 is to support other types and user defined types as well as these.) For the purpose of making calls to API or 3rd party DLL
s there is a STRUCT and the additional types necessary for the DLL. The only other data structure currently supported is the ARRAY. Arrays of one or two dimensions are supported. LB5 may support arrays of user-defined types.
"Hello world" program:
Program to display a pop-up message box with the words "Hello, World!" on it:
Program to display an input box:
Running another application using Liberty BASIC:
Printing multiplication table of 5 on form:
Computer
A computer is a programmable machine designed to sequentially and automatically carry out a sequence of arithmetic or logical operations. The particular sequence of operations can be changed readily, allowing the computer to solve more than one kind of problem...
programming language
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....
and integrated development environment
Integrated development environment
An integrated development environment is a software application that provides comprehensive facilities to computer programmers for software development...
(IDE). It has an interpreter
Interpreter (computing)
In computer science, an interpreter normally means a computer program that executes, i.e. performs, instructions written in a programming language...
developed in Smalltalk
Smalltalk
Smalltalk is an object-oriented, dynamically typed, reflective programming language. Smalltalk was created as the language to underpin the "new world" of computing exemplified by "human–computer symbiosis." It was designed and created in part for educational use, more so for constructionist...
, which recognizes its own dialect
Programming language dialect
A dialect of a programming language is a variation or extension of the language that does not change its intrinsic nature. With languages such as Scheme and Forth, standards may be considered insufficient, inadequate or even illegitimate by implementors, so often they will deviate from the...
of the BASIC
BASIC
BASIC is a family of general-purpose, high-level programming languages whose design philosophy emphasizes ease of use - the name is an acronym from Beginner's All-purpose Symbolic Instruction Code....
programming language. It runs on 16-
16-bit
-16-bit architecture:The HP BPC, introduced in 1975, was the world's first 16-bit microprocessor. Prominent 16-bit processors include the PDP-11, Intel 8086, Intel 80286 and the WDC 65C816. The Intel 8088 was program-compatible with the Intel 8086, and was 16-bit in that its registers were 16...
and 32-bit
32-bit
The range of integer values that can be stored in 32 bits is 0 through 4,294,967,295. Hence, a processor with 32-bit memory addresses can directly access 4 GB of byte-addressable memory....
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...
and OS/2
OS/2
OS/2 is a computer operating system, initially created by Microsoft and IBM, then later developed by IBM exclusively. The name stands for "Operating System/2," because it was introduced as part of the same generation change release as IBM's "Personal System/2 " line of second-generation personal...
.
Background
Liberty BASIC was written by Carl Gundel and published in its first release by his company, Shoptalk Systems, in 1992. It has progressed steadily since then. The last published update to the software was in 2006. The current version is v4.04.Liberty BASIC has been used in examples of code for various guides and references about programming
Computer programming
Computer programming is the process of designing, writing, testing, debugging, and maintaining the source code of computer programs. This source code is written in one or more programming languages. The purpose of programming is to create a program that performs specific operations or exhibits a...
in Windows, including "Beginning Programming For Dummies", by Wallace Wang.
Though Liberty BASIC has its share of limitations in its design for advanced programming, it makes a credible and very usable introductory integrated development environment, IDE, for moderate to advanced users of Windows and OS/2. DLL
Dynamic-link library
Dynamic-link library , or DLL, is Microsoft's implementation of the shared library concept in the Microsoft Windows and OS/2 operating systems...
s are available with functions allowing users to overcome most of the limitations in Liberty BASIC. The OS/2 version is very old, but free. A new version that will run on Windows, Macintosh and 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...
is in active development.
The Liberty BASIC dialect, and IDE, have developed a market niche for introductory and intermediate programmers who are learning the skills of programming, though it has been less widely adopted as a commercial publishing product. This does not mean that Liberty Basic is educational software
Educational software
Educational software is computer software, the primary purpose of which is teaching or self-learning.-Early History, 1940s - 1970s:The use of computer hardware and software in education and training dates to the early 1940s, when American researchers developed flight simulators which used analog...
only. It is still a commercial product, and can be used to create proprietary software
Proprietary software
Proprietary software is computer software licensed under exclusive legal right of the copyright holder. The licensee is given the right to use the software under certain conditions, while restricted from other uses, such as modification, further distribution, or reverse engineering.Complementary...
.
In its current version, it runs only on Microsoft 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...
, but version 5 is in active development and runs on Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...
and Linux systems as well.
Liberty Basic is not a true compiler
Compiler
A compiler is a computer program that transforms source code written in a programming language into another computer language...
. Liberty Basic translates the code written in the IDE to an encrypted (not 'tokenized') file with the extension "tkn". This file is then interpreted by an executable file that carries the same file name, although this may change with the release of version 5.
Features
- A visual development tool called FreeForm, written in Liberty BASIC and greatly extended by the Liberty BASIC community over the years
- Source level debugger
- calling of DLLDynamic-link libraryDynamic-link library , or DLL, is Microsoft's implementation of the shared library concept in the Microsoft Windows and OS/2 operating systems...
s and APIApplication programming interfaceAn application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...
s - Color graphics capability
- Can create games with sprite animation, sound, music, and joystick control
- An add-on package called Assist with many new features, such as a code formatter, source code versioning, a performance profiler, an easy-to-use code difference browser, and an improved package and deployment system
Distinguishing features
Liberty BASIC allows for programming in a style similar to DOSDOS
DOS, short for "Disk Operating System", is an acronym for several closely related operating systems that dominated the IBM PC compatible market between 1981 and 1995, or until about 2000 if one includes the partially DOS-based Microsoft Windows versions 95, 98, and Millennium Edition.Related...
BASICs that run in console mode, using a default "main window" that displays formatted text and accepts user input. It also supports GUI
Gui
Gui or guee is a generic term to refer to grilled dishes in Korean cuisine. These most commonly have meat or fish as their primary ingredient, but may in some cases also comprise grilled vegetables or other vegetarian ingredients. The term derives from the verb, "gupda" in Korean, which literally...
-based event-driven programming using several types of windows that may contain the standard controls such as buttons, menus, textboxes, etc.
A central idea in creating Liberty BASIC was to model the handling of windows after the syntax
Syntax
In linguistics, syntax is the study of the principles and rules for constructing phrases and sentences in natural languages....
for file handling. For example, (from the Liberty BASIC Help File):
"The OPEN command opens communication with a device, which can be a disk file, a window, a dynamic link library or a serial communications port."
This general purpose syntax is one of the features of LB that make it easier to learn.
Once a “device” is open, data and also commands to control that device can be “printed” to it. For each type of device there is a set of commands which can be sent to it in this way. In the more recent versions of LB the word "print" may be dropped from the "print" statement, making the syntax even simpler.
Simplicity has been at the heart of Liberty BASIC from the beginning. This makes it easier to learn but at some cost, perhaps, in limiting functionality. Only two data types are supported in LB4.03: numeric and string. No type declarations are required: any variable with a $ sign at the end of its name is a string variable; otherwise it is numeric. (The plan for LB5 is to support other types and user defined types as well as these.) For the purpose of making calls to API or 3rd party DLL
Dynamic-link library
Dynamic-link library , or DLL, is Microsoft's implementation of the shared library concept in the Microsoft Windows and OS/2 operating systems...
s there is a STRUCT and the additional types necessary for the DLL. The only other data structure currently supported is the ARRAY. Arrays of one or two dimensions are supported. LB5 may support arrays of user-defined types.
Notable programs written in Liberty BASIC
- FreeForm, a GUI Editor was written in LB for easily creating simple or complicated GUI formats
Example code
Here are some examples of the language:"Hello world" program:
Program to display a pop-up message box with the words "Hello, World!" on it:
Program to display an input box:
Running another application using Liberty BASIC:
Printing multiplication table of 5 on form:
See also
- Liberty BASIC WorkshopLiberty BASIC WorkshopLiberty BASIC Workshop, created by programmer Alyce Watson, is an add-on IDE for the Liberty BASIC language. It runs on the Windows platform. It was honored as a Dr. File Finder Pick on Tucows, a very coveted position for computer applications....
(an add-on IDE for Liberty BASIC) - Just BASICJust BASICJust BASIC is a dialect of the highly popular programming language BASIC of the 1970s, for 32-bit computer systems using Windows. It's the freeware version of Liberty BASIC, popular since 1992. Just BASIC development began in 2001; first public release was in 2004...
(a freeware version of Liberty BASIC) - Run BASICRun BASICRun BASIC is a web application server, based on the Liberty BASIC version of the BASIC programming language. Run BASIC is developed by Shoptalk Systems; v1.01 was released in November 2008.-Programming model:...
(a free-to-use web programming site based on Liberty BASIC)