Plus (programming language)
{{Infobox programming language
| name = Plus
| logo =
| paradigm = imperative, structured
| typing = static, strong, safe
| implementations = IBM System/370, DEC PDP-11, and Motorola 68000
| dialects =
| year = 1976
| designer =
| developer = Alan Ballard and Paul Whaley at UBC
| latest release version =
| latest release date =
| influenced_by = SUE, Pascal
| influenced =
| operating_system = Michigan Terminal System (MTS), OS/VS1
| license =
| website =
}}
Plus is a "Pascal-like" system implementation language from the University of British Columbia (UBC), Canada, based on the SUE[http://doi.acm.org/10.1145/800234.807062 The System Language for Project SUE], B. L. Clark and J. J. Horning of the Computer Systems Research Group and Department of Computer Science, University of Toronto, Proceedings of the SIGPLAN symposium on Languages for system implementation, 1971, pages 79-88 system language developed at the University of Toronto, c. 1971.[https://docs.google.com/file/d/0B4t_NX-QeWDYYlYydkNuQjFTU3k0dHg5VUpWQXJOdw/edit "The Plus Systems Programming Language"], [https://riordanmr.github.io/mischtml/mts/ThePlusSystemsProgrammingLanguage.html HTML version], Alan Ballard and Paul Whaley, Proceedings of Canadian Information Processing Society (CIPS) Congress 84, June 1984{{efn|There is a separate programming language named PLUS, developed at Sperry Univac in Roseville, Minnesota.[http://portal.acm.org/citation.cfm?doid=954127.954144 The PLUS Programming Language], Frank W. Stodola, Sperry Univac, Roseville, Minnesota, ACM SIGPLAN Notices, Volume 15, Issue 1 (January 1980), pp. 146-155}}
Description
Plus was developed at the University of British Columbia (UBC) Computing Centre by Alan Ballard and Paul Whaley for use with and for the development of the Michigan Terminal System (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.
The UBC Plus compiler is written largely in Plus, runs under the Michigan Terminal System (MTS) on IBM S/370 or compatible hardware or under IBM's OS/VS1,Using Peter Ludemann's emulation of MTS system calls. 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, {{circa}} 1971, which in turn had been derived, particularly in its data structure facilities, from Pascal.{{cn|date=June 2024}}
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:[http://hdl.handle.net/2027.42/79616 The PLUS Programming Language], Allan Ballard and Paul Whaley, pp. 2-5, revised 1987, Computing Centre, University of British Columbia
- Allow and encourage reasonable program structures
- Provide problem-oriented data structures
- Allow and encourage readable and understandable source code
- Allow for parametrization using symbolic constants
- Actively assist in the detection and isolation of errors, at compile-time if possible and optionally at run-time where necessary
- Generate efficient code
- Provide facilities necessary for systems programming
- Provide reasonably efficient compilation including separate compilation of different parts of a program
- Optionally produce symbol (SYM) 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.[http://hdl.handle.net/2027.42/79577 PLUS Source Library Definitions], Alan Ballard, 1983, University of British Columbia Computing Centre, 139pp.
"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(Mcb, "Hello, world!");
Message_Terminate(Mcb);
Mcb := Null;
end Main;
See also
- Michigan Terminal System (MTS)
Notelist
{{notelist}}
References
{{Reflist}}
{{DEFAULTSORT:Plus (Programming Language)}}
Category:Pascal programming language family
Category:Procedural programming languages
Category:Statically typed programming languages