The complete source code for patternForth follows. This code was written for compatibility with the current Forth standard, the 1983 Standard. However, the code was written and tested on a non-Standard system with a "compatibilty extension" loaded, and there may be some deviations from '83 Standard usage.
Forth source code is organized into "screens," each consisting of 16 lines of 64 characters. (This is an artifact of the early days of Forth mass storage management.) It is common to print three screens, or a "triad," on a single page of listing; this format is used here.
Every screen of source code has an assocaited "shadow" screen for documentation. Customarily, the shadow screens are printed alongside the corresponding source screens in a wide-format listing. Because of publication constraints here, each set of three shadow screens is on the page immediately following their source screens.
Forth compilation is usually controlled by a "load screen," which indicates the order in which source screens are to be compiled. This load screen is screen number 9. Note that the source screens are not loaded in strictly sequential order, and that several screens are "skipped." This is the effect of false starts and earlier versions of the code which have been retained for future study, and is characteristic of "configuration management" as it is commonly practiced in a Forth environment. For clarity, most of these false starts and "dead" versions have been omitted from the listing. The notation *OBS* in the first line of a screen indicates obsolete code.
The full "index" of screens 0-60, showing the first line of each source screen, is also supplied.