- Advertisement -

- Advertisement -

OHIO WEATHER

Liberty BASIC: Difference between revisions


 

Line 102: Line 102:

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.

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 benifit, others see it as a debugging issue for imperfect typers. In 2019 Peter Matthews devised a method for adding declarations and checking for undeclared data – without changing the code seen by LB. In 2023 this system was ported to GitHub in public repository “LBPrePass”. 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.

== See also ==

== See also ==

The Liberty Basic v4.03 IDE 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.

Background[edit]

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. The last published update to the software, version 4.5.1, was in June 2018.[1]

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 (DLLs) are available. In its current version, it runs only on Microsoft Windows, and under Wine on Linux. Alpha testing of Liberty BASIC v5.0 is underway with versions that run on Microsoft Windows, Mac OS X, 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[edit]

Liberty Basic v4.03 running on Linux with Wine
  • 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 interfaces (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[edit]

Liberty BASIC allows for procedural programming in a style similar to DOS 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 (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 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 {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…



Read More: Liberty BASIC: Difference between revisions

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

Privacy & Cookies Policy

Get more stuff like this
in your inbox

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.