This document serves as a language manual for BASIC-PLUS-2, designed for users familiar with the BASIC language. It primarily focuses on the language elements and statement syntax, omitting system-specific details, which are covered in separate user guides for DECSYSTEM-20 and PDP-11.
The manual is structured into eleven chapters and several appendices. It introduces the fundamental structure of BASIC programs, including character sets, line formats, and statements for basic operations and program documentation. It then details the elements of BASIC-PLUS-2, covering constants, variables (numeric, integer, string, subscripted), and expressions (arithmetic, relational, string, logical), along with array handling using LET and DIM statements.
Key aspects covered include terminal input/output (INPUT, READ/DATA/RESTORE, PRINT) and formatted output using the PRINT USING statement. Control statements for program flow (GOTO, ON-GOTO, IF-THEN-ELSE), loop execution (FOR/NEXT, WHILE/UNTIL), time limits (SLEEP, WAIT), program termination (STOP, END), subroutines (GOSUB/RETURN), and error checking (ONERROR GOTO/RESUME) are also explained.
Advanced features include statement modifiers, various numeric and string functions (e.g., SQR, LEN, MID$, DATE$), conversion functions, and user-defined functions. It also delves into array manipulation, matrix operations, and comprehensive file management, distinguishing between terminal-format files, virtual array files, and record I/O, with detailed explanations of OPEN, CLOSE, KILL, NAME-AS, and dynamic I/O buffer mapping. Finally, the manual covers program segmentation through subprograms (SUB/CALL/SUBEND/SUBEXIT) and inter-program control using the CHAIN statement and COMMON blocks. Appendices provide quick references for statements, functions, operators, ASCII codes, reserved words, and a glossary.
Site structure and layout ©2025 Majenko Technologies