Liberty BASIC
system Liberty BASIC (LB) 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.
system Liberty BASIC (LB) 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. OPEN device FOR purpose AS #handle {LEN = n} 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. ==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: [multi] 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 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. 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. Liberty Basic does not provide for data declarations. Instead any new data name is treated as a new declaration. Some regard this as a benefit, others see it as a debugging issue for imperfect typers. In 2019 Peter J. D. Matthews devised a method for adding declarations and checking for undeclared data - without changing the code seen by the LB interpreter. In 2023 this system was ported to GitHub in public repository "LBPrePass" for anyone to use. This repository also contains program documentation. The program is written in Liberty Basic 4.5.1 and is intended to analyse 4.5.1 code.
References
No reference rows published for this article.
Cite this article
MLA
"Liberty BASIC." encyclopegia.org, 2025, https://encyclopegia.org/wiki/liberty-basic. Accessed 24 November 2026.
Chicago
"Liberty BASIC." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/liberty-basic.
APA
encyclopegia.org. (2025). Liberty BASIC. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/liberty-basic
Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON