Plus (programming language)
Encyclopedia
Plus is a "Pascal-like" system implementation language from the University of British Columbia
University of British Columbia
The University of British Columbia is a public research university. UBC’s two main campuses are situated in Vancouver and in Kelowna in the Okanagan Valley...

 (UBC), Canada, based on the SUE system language developed at the University of Toronto
University of Toronto
The University of Toronto is a public research university in Toronto, Ontario, Canada, situated on the grounds that surround Queen's Park. It was founded by royal charter in 1827 as King's College, the first institution of higher learning in Upper Canada...

, circa 1971.

Description

Plus was developed at the University of British Columbia
University of British Columbia
The University of British Columbia is a public research university. UBC’s two main campuses are situated in Vancouver and in Kelowna in the Okanagan Valley...

 (UBC) Computing Centre by Alan Ballard and Paul Whaley for use with and for the development of the Michigan Terminal System
Michigan Terminal System
The Michigan Terminal System is one of the first time-sharing computer operating systems. Initially developed in 1967 at the University of Michigan for use on IBM S/360-67, S/370 and compatible mainframe computers, it was developed and used by a consortium of eight universities in the United...

 (MTS), 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.

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.

The UBC Plus compiler is written largely in Plus, runs under the Michigan Terminal System
Michigan Terminal System
The Michigan Terminal System is one of the first time-sharing computer operating systems. Initially developed in 1967 at the University of Michigan for use on IBM S/360-67, S/370 and compatible mainframe computers, it was developed and used by a consortium of eight universities in the United...

 (MTS) on IBM S/370 or compatible hardware or under IBM's OS/VS1
OS/VS1
Operating System/Virtual Storage 1, or OS/VS1,was an IBM mainframe computer operating system designed to be run on IBM System/370 hardware....

, and generates code for the IBM S/370, the DEC
Digital Equipment Corporation
Digital Equipment Corporation was a major American company in the computer industry and a leading vendor of computer systems, software and peripherals from the 1960s to the 1990s...

 PDP-11
PDP-11
The PDP-11 was a series of 16-bit minicomputers sold by Digital Equipment Corporation from 1970 into the 1990s, one of a succession of products in the PDP series. The PDP-11 replaced the PDP-8 in many real-time applications, although both product lines lived in parallel for more than 10 years...

, or the Motorola 68000
Motorola 68000
The Motorola 68000 is a 16/32-bit CISC microprocessor core designed and marketed by Freescale Semiconductor...

 architectures.

Plus is based to a large extent on the SUE System Language developed at the University of Toronto, circa 1971. The SUE language was derived, particularly in its data structure facilities from Pascal
Pascal (programming language)
Pascal is an influential imperative and procedural programming language, designed in 1968/9 and published in 1970 by Niklaus Wirth as a small and efficient language intended to encourage good programming practices using structured programming and data structuring.A derivative known as Object 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
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

 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 (SYM) information allowing programs to be debugged using a Symbolic Debugging System such as SDS under MTS


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(Pluslist);
%Subtitle := "Definitions";
%Lower_Case := True;

/* Definitions that everyone needs */
%Include(Boolean, Numeric_Types, More_Numeric_Types, String_Types,
More_String_Types);

/* A tasteful subset of procedure definitions */
%Include(Main);

/* Message routine definitions */
%Include(Message_Initialize, Message, Message_Terminate);

%Subtitle := "Local Procedure Definitions";
%Eject;
definition Main

variable Mcb is pointer to Stream_Type;

Mcb := Message_Initialize;
Message("Hello, world!");
Message_Terminate(Mcb);
Mcb := Null;

end Main;
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK