Skip to main content

Posts

Despite the fairly recent addition of real functions and subs to the language, Liberty Basic still pushes you to use the old gosub/return construct. This pressure is not obvious until you're actually writing programs. Let's see how the pressure builds: Parameters passed to a function or sub are "by value". This means that a copy is made and no changes can be made to original variable in the function call. Global variables are not visible in a function or sub with the exception of arrays, structs, handles and system variables. Sometimes you need to return more than one value. Using single-dimensioned, 1-element arrays as global variables is ugly. The cleanest solution is to make the code global as a chunk of gosub/return code. This might be a partial answer to the question I had about why so many Liberty Basic programmers keep on using this construct instead of switching entirely to functions and subs. There are a few things that require functions -...
The purpose of this blog is to talk about Liberty Basic in particular and computer science in general. Liberty Basic is an easy to use Windows dialect of the BASIC programming language. It's written in Smalltalk by Carl Gundel. Liberty Basic 3.02 can be downloaded as shareware at the official website . There is no expiration, but programs can't be larger than 250 lines of code and they can't run outside of the LB editor. It's a reasonable limitation. The Silver registration ($29.95) removes the code size limit and popup reminders. The Gold registration ($49.95) adds the ability to create standalone applications that run outside of the editor. Future posts will both praise and bash this venerable tool. It has been around for 10 years, first as a 16-bit language and now as a 32-bit language. As a computer professional, its limits can sometimes be frustrating, but even so it remains the most "fun" language in my tool chest.