BASIC-PLUS is an extended dialect of the BASIC programming language that was developed by Digital Equipment Corporation (DEC) for use on its RSTS/E time-sharing operating system for the PDP-11 series of 16-bit minicomputers in the early 1970s through the 1980s.
BASIC-PLUS added a number of new structures, as well as features from JOSS concerning conditional statements and formatting.
In future versions of the language, notably Microsoft's, CHANGE was removed and BASIC-PLUS's string functions became the only ways to perform these sorts of operations.
The language was later rewritten as a true compiler as BASIC-Plus-2, and was ported to the VAX-11 platform as that machine's native BASIC implementation.
As a smart terminal with cursor control could not be guaranteed, BASIC-PLUS used the common system of prefixing all source code with a line number.
Using BASIC-PLUS, about half of this virtual address space was used by the combined command interpreter and run-time library (named the Run Time System on RSTS/E).
The use of a shared memory section called core common also allowed programs to pass data to each other as needed.
BASIC-PLUS is patterned closely on later versions of Dartmouth BASIC, including its powerful MAT commands.
[4] The system allowed tabs to be used as inline whitespace, and was used to make loops more clear, as in modern languages.
[10] In addition to the CHR and ASCII functions that converted single characters to and from string format,[11] BASIC-PLUS also supported Dartmouth's CHANGE command.
CHANGE iterated the string and returned each character's ASCII value as a slot in a numeric array.
[12] One could reverse the operation as well, CHANGE X TO A$ would read the individual numbers in the X array and convert it to a string.
[24][25] The language also included a number of MAT commands to work with the entire array (or MATrix).
Additional rules were imposed on virtual arrays, such that one datum could never span a record boundary: Each data type was aligned to a multiple of its size.
Virtual strings were stored as fixed-length ASCIIZ data, with sizes restricted to 2, 4, 8, 16, 32, 64, 128, 256, or 512 bytes, and were accessed using LSET and RSET.
[31] BASIC-PLUS was not an interpreter but a compile and go system: each line of BASIC was translated into "PPCODE" (Push-Pop Code) as it was entered, for subsequent fast execution on its virtual machine.
One was the editable source code in text format, created using the SAVE command and normally placed in a .BAS file.
[32] A related product called Basic Plus 2 ("BP2" or BASIC-Plus-2), was later developed by DEC to add additional features and increased performance.
The ability to place logical and loop commands in-line, like I = I + 1 UNTIL I = 10 was not copied over and does not appear on any common version of microcomputer BASIC.