Plus (programming language)


Plus is a "Pascal-like" system implementation language from the University of British Columbia, Canada, based on the SUE system language developed at the University of Toronto, c. 1971.
There is another programming language named PLUS, developed at Sperry Univac in Roseville, Minnesota, but the Univac PLUS is not the subject of this article.

Description

Plus was developed at the University of British Columbia Computing Centre by Alan Ballard and Paul Whaley for use with and for the development of the Michigan Terminal System, but the code generated by the compiler is not operating system dependent and so is not limited to use with or the development of MTS.
The UBC Plus compiler is written largely in Plus, runs under the Michigan Terminal System on IBM S/370 or compatible hardware or under IBM's OS/VS1, and generates code for the IBM S/370, the DEC PDP-11, or the Motorola 68000 architectures.
Plus is based to a large extent on the SUE System Language developed at the University of Toronto, c. 1971. The SUE language was derived, particularly in its data structure facilities from Pascal.
Plus is superficially quite different from SUE or Pascal; however the underlying language semantics are really quite similar. Users familiar with the C programming language will also recognize much of its structure and semantics in PLUS.
Goals for the compiler and the Plus language include:
  1. Allow and encourage reasonable program structures
  2. Provide problem-oriented data structures
  3. Allow and encourage readable and understandable source code
  4. Allow for parametrization using symbolic constants
  5. Actively assist in the detection and isolation of errors, at compile-time if possible and optionally at run-time where necessary
  6. Generate efficient code
  7. Provide facilities necessary for systems programming
  8. Provide reasonably efficient compilation including separate compilation of different parts of a program
  9. Optionally produce symbol information allowing programs to be debugged using a Symbolic Debugging System such as SDS under MTS
The compiler generates extensive source listings, including cross-references. In addition, it automatically formats the source using strict rules and has a simple mark-up language for comments.
The manual, UBC PLUS: The Plus Programming Language, is available. A description of the source and object libraries available for use with Plus, PLUS Source Library Definitions, is also available.

"Hello, world" example

The "hello, world" example program prints the string "Hello, world!" to a terminal or screen display.
%Title := "Hello world";
%Include;
%Subtitle := "Definitions";
%Lower_Case := True;
/* Definitions that everyone needs */
%Include;
/* A tasteful subset of procedure definitions */
%Include;
/* Message routine definitions */
%Include;
%Subtitle := "Local Procedure Definitions";
%Eject;
definition Main
variable Mcb is pointer to Stream_Type;
Mcb := Message_Initialize;
Message;
Message_Terminate;
Mcb := Null;

end Main;