Illustrating BASIC is a 1977 primer for the BASIC programming language by Donald Alcock. It is one of the few that is written using Dartmouth BASIC Version 4.
Dartmouth BASIC is the original BASIC, and was widely copied across mainframe and minicomputer platforms in the 1960s and early 1970s. These were almost always based on the early versions of the original Dartmouth dialect. Starting with Verson 4 in 1968, Dartmouth added a number of powerful features. While these features were often found on other mainframe versions, they were rarely seen on minis and the microcomputer versions that copied them. For this reason, it is difficult to find examples of code that use the more interesting features that were added in V4, like matrix math and PRINT USING
. Illustrating BASIC is one of the few texts that makes more than passing use of these features.
In the original book, programs are presented in a somewhat haphazard way, in snippets intended to illustrate one feature or another. All of the source code was hand-written, not typed, which results in odd spacing and other inconsistances between the examples. These have been translated into as common a format as possible. The only changes were to add a REM
if one did not appear in the original text, generally using line number 5, and adding the page number to that remark to make it easier to look up. Not all programs have been copied, a number were too simple to be worthwhile.
There are two complete programs in the collection, bestwayhome
, which runs the shortest path problem, and roman
, which translates roman numerals into decimal. moo
and breakdowns
are both relatively lengthy as well.
RetroBASIC, which emulates Dartmouth V4 along with many other dialects, should run all of these programs with no changes.