A language created by the Datapoint Corporation in the early 1970's. The language looks very similar to COBOL or BASIC but is much easier to understand and read.
There are two major implementations of the language. They are provided by Sunbelt Computer Systems (http://www.sunbelt-plb.com) and Subject Wills which is not actively marketed. Code written for one requires some minor conversion to compile on the other compiler but with regard to the ANSI language standard, the implementations are quite similar.
PL/B is a strictly typed language with two base types: Dim and Form. There are also higher structures like Records (which are like structs) and arrays, and even higher level structures such as Printers, Com files, Text Files, ISAM files, Associative Access files, direct RDBMS manipulations and GUI elements.
There are also four flags that change state depending on your instruction. They are EQUAL (or ZERO), OVER, EOS (end of string), and LESS.
PL/B provides sequential, random, indexed sequential (ISAM), and a unique Associated Aamdex (AAM) file access. In general, defining and working with files, (getting, adding, updating, and deleting records) is extremely easy. PLB has built in RDBMS functions that provide data access via ODBC. It also provides communication access via serial ports or TCP/IP sockets.
White space has some meaning in the language. All "Labels" (that is, data definitions or program execution labels) must begin in column one. A label may be followed by one or more white space characters. The next token on the line is considered the "Verb". Following the verb is one or more white spaces and then the operands. The number and type of the operands are dependent on the verb.
A valid PL/B Statement looks like this:
[label] Operator Operand[Separator Operand][Separator Operand]The "Verbs" are usually an English Language word that is somewhat descriptive such as DISPLAY or ADD.
Separators are either commas or one of the prepositions BY, TO, OF, FROM, USING, WITH, IN, or INTO. This means that the following statements are exactly the same:
ADD "4" TO MYVAR ADD "4" WITH MYVAR ADD "4" INTO MYVAR ADD "4" OF MYVAR ADD "4",MYVARComments are lines that start with '*','.' or '+'.
The Subject Wills implementation does provide very basic OO facilities while Sunbelt does not. However, Sunbelt's compiler and runtime have a much better GUI toolkit.
In general, this language is high level due to the ease that one can work with ISAM/AAM files, printers, com devices, and ANSI display devices. There are no abstract data types. There are quite a number of string manipulation functions that are one of the strengths of the language.
PL/B Encourages Good Library Writing.
Databus was developed in the early 1970s as a simple language for programming data entry applications on an IBM remote data terminal emulator. Its careful maintenance of typing and easy use of built-in ISAM files made it useful for more than just data entry; stand-alone applications were possible and could be programmed faster and easier than the other languages of the day. Even today, creating a PL/B program is much simpler than many other well known languages.
Historically the byte code nature of the language made it a very portable application language, only requiring a virtual machine on another platform to run.
Related: