User:BASICwebmaster/Liberty BASIC

Note: This is a draft for a complete overhaul Liberty BASIC page. The existing article is written poorly, semi-contradictory, and out-of-date.

Liberty BASIC is a commercial programming language and integrated development environment (IDE) that works on 16 and 32 bit Windows and also on OS/2.

Background

edit

Liberty BASIC was written by Carl Gundel and was published in its first release by his company, Shoptalk Systems in 1992, and has progressed steadily since then. The last published update to the software was in 2006. The current version is v4.03.

Liberty BASIC has been used in examples of code for various guides and references about programming in Windows, including "Beginning Programming For Dummies", written by Wallace Wang, and published by Hungry Minds International.

Though Liberty BASIC has its share of limitations in its design for advanced programming, it makes a credible and highly usable introductory IDE for moderate to advanced users of Windows and OS/2. The OS/2 version is very old, but free.

The compiler recognizes its own dialect of the BASIC programming language.

The programming language dialect, and the 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 is not to say that Liberty Basic is educational software only. It is still a commercial product, and can be used to create commercial software.

In its current version, it runs only on Microsoft Windows, but v5 is planned to run on Mac OS and Linux systems as well, in addition to being "up to 5 times faster" than the current version, says its author.

License Information

edit

A 30-day free trial version is available. The trial version does not allow creation of programs that run independent of the development environment.

The GOLD license permits the creation of standalone applications using a runtime engine and some support files. Standalone applications do not require the inclusion of program source code.

Features

edit
  • A visual development tool called FreeForm, written in Liberty BASIC. It has been greatly extended by the Liberty BASIC community over the years.
  • An editor for writing BASIC programs
  • A source level debugger
  • Easy calling of DLLs and APIs
  • Color graphics capability
  • Can create games with sprite animation, sound, music, and joystick control
  • A unique interactive tutorial suitable for the beginner
  • Loads of free websites for source code and fully working programs
  • An add-on package called Assist. Assist has 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.

Programming using Liberty BASIC

edit

General:

Liberty Basic was developed over a period of years based mostly on Carl Gundel’s vision of what a Basic language for Windows should be and partly in response to an active user community. The result is a powerful language that is easier than most to learn. The best way for a beginner to learn is to work through the tutorials that come with LB and, when in need of help, to post questions at the Liberty BASIC CommunityForum (see links) where experienced programmers give their advice freely. Searching that forum for particular topics can turn up very helpful past threads and there are many other resources available to help people learn the language – see links below and links on the forum site.

For The Experienced Programmer:

Liberty Basic is highly compatible with earlier basics such as QBasic but gives the programmer the additional ability to tap the resources of the Windows operating system. A central idea in creating LB was to model the handling of windows after the syntax for file handling. For file I/O, in the older Basics such as QBasic, one opens a file, inputs from it or outputs to it, and closes the file when finished with it. So in LB the syntax for windows follows the same model:

(From the Liberty Basic Help File)


OPEN device FOR purpose AS #handle {LEN = n}

Description: 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 so easy 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 LB from the beginning. 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 DLLs 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.


See also

edit
edit