HOME

TheInfoList



OR:

Liberty BASIC (LB) is a commercial computer
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
and
integrated development environment An integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of at least a source code editor, build automation tools ...
(IDE). It has an interpreter, developed in
Smalltalk Smalltalk is an object-oriented, dynamically typed reflective programming language. It was designed and created in part for educational use, specifically for constructionist learning, at the Learning Research Group (LRG) of Xerox PARC by Alan ...
, which recognizes its own
dialect The term dialect (from Latin , , from the Ancient Greek word , 'discourse', from , 'through' and , 'I speak') can refer to either of two distinctly different types of linguistic phenomena: One usage refers to a variety of a language that is ...
of the
BASIC BASIC (Beginners' All-purpose Symbolic Instruction Code) is a family of general-purpose, high-level programming languages designed for ease of use. The original version was created by John G. Kemeny and Thomas E. Kurtz at Dartmouth College ...
programming language. It runs on 16- and
32-bit In computer architecture, 32-bit computing refers to computer systems with a processor, memory, and other major system components that operate on data in 32- bit units. Compared to smaller bit widths, 32-bit computers can perform large calculati ...
Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for se ...
and
OS/2 OS/2 (Operating System/2) is a series of computer operating systems, initially created by Microsoft and IBM under the leadership of IBM software designer Ed Iacobucci. As a result of a feud between the two companies over how to position OS/2 r ...
.


Background

Liberty BASIC was written by Carl "Gunner" Gundel and published in its first release by his company, Shoptalk Systems, in 1991. It has progressed steadily since then. to the software, version 4.5.1, was in June 2018. Though Liberty BASIC has its share of limitations in its design for advanced programming, it provides an introductory integrated development environment, IDE, for moderate to advanced users of Windows and OS/2.
Dynamic-link libraries Dynamic-link library (DLL) is Microsoft's implementation of the shared library concept in the Microsoft Windows and OS/2 operating systems. These libraries usually have the file extension DLL, OCX (for libraries containing ActiveX controls), or ...
(DLLs) are available. In its current version, it runs only on
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ...
, and under Wine on Linux. Alpha testing of Liberty BASIC v5.0 is underway with versions that run on
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ...
,
Mac OS X macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and lap ...
, Linux and on the Raspberry Pi as well. Liberty BASIC does not compile to native code. Instead it compiles the code written in the IDE to an encrypted file with the extension TKN. This file is then executed by an EXE 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 DLLs and
application programming interface An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
s (APIs) * 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 procedural programming in a style similar to
DOS DOS is shorthand for the MS-DOS and IBM PC DOS family of operating systems. DOS may also refer to: Computing * Data over signalling (DoS), multiplexing data onto a signalling channel * Denial-of-service attack (DoS), an attack on a communicat ...
BASICs that run in console mode, using a default "main window" that displays formatted text and accepts user input. It also supports event-driven programming based on a
graphical user interface The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, ins ...
(GUI), 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 In linguistics, syntax () is the study of how words and morphemes combine to form larger units such as phrases and sentences. Central concerns of syntax include word order, grammatical relations, hierarchical sentence structure ( constituenc ...
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." OPEN device FOR purpose AS #handle 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 LB v4.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 LB v5 is to support other types and user defined types as well as these.) For the purpose of making calls to an API or third-party DLLs there is a STRUCT and the additional types necessary for the DLL. The only other data structure supported is the ARRAY. Arrays of one or two dimensions are supported. LB v5 may support arrays of user-defined types.


Notable programs written in Liberty BASIC

* FreeForm, a GUI editor for creating GUI formats, was written in LB.


Example code

Here are some examples of the language: "Hello, World!" program: print "Hello, World!" end Program to display a pop-up message box with the words "Hello, World!" on it: nomainwin notice "Hello, World!" end nomainwin notice "Example program" + CHR$(13) + "Hello, World!" end Program to display an input box: nomainwin prompt "Enter your name:"; response$ notice "Response:" + CHR$(13) + response$ end Running another application: nomainwin run "notepad.exe" end Printing multiplication table of 5 on form:
ulti Ulti or Ultimó, is Hungary's national trick-taking card game for three players. It is virtually unknown outside its home borders. History Its name derives from the winning of the last trick with the lowest trump, a feature derived from several g ...
for i = 1 to 15 res = 5 * i print res next i end


Alternative implementations

The GNU/Liberty Basic Compiler Collection (GLBCC), by Anthony Liguori, is a set of tools to compile Liberty Basic programs, runs on Windows and Linux systems, but the project has not been updated since 2001. In 2012 an alternative
Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for se ...
implementation of Liberty BASIC, LB Booster (LBB), became available. Although substantially compatible with the Liberty BASIC 4 language syntax, LBB was developed entirely independently by Richard Russell and is written in
BBC BASIC BBC BASIC is a version of the BASIC programming language released in 1981 as the native programming language for the BBC Micro home/personal computer, providing a standardized language for a UK computer literacy project of the BBC. It was wr ...
. LBB offers (typically) increased execution speed, smaller self-contained executables and some additional capabilities. However LBB is not 100% compatible with LB4 and while many programs will run without modification, some may need to be adapted, or may even be unsuitable for running under LBB.


See also

* Run BASIC — a free-to-use Web application server based on Liberty BASIC


References


External links


www.libertybasic.com
nbsp;— official site
Carl Gundel's blog

Liberty BASIC
(in French)
Liberty BASIC
on
Rosetta Code Rosetta Code is a wiki-based programming website with implementations of common algorithms and solutions to various programming problems in many different programming languages. It is named for the Rosetta Stone, which has the same text inscri ...

GNU/Liberty Basic Compiler Collection (GLBCC)

LB Booster
{{Use mdy dates, date=March 2012 BASIC interpreters BASIC programming language family