The data types in RTL/2 were strongly typed, with separate compiling. The compilation units contained one or more items named bricks, i.e.:
A procedure brick was a procedure, which may or may not return a (scalar) value, have (scalar) parameters, or have local (scalar) variables. The entry mechanism and implementation of local variables was reentrant. Non-scalar data could only be accessed via reference (so-called REF variables were considered scalar).
A data brick was a named static collection of scalars, arrays and records. There was no heap or garbage collection, so programmers had to implement memory management manually.
A stack brick was an area of storage reserved for running all the procedures of a single process and contained the call stack, local variables and other housekeeping items. The extent to which stack bricks were used varied depending on the host environment in which RTL/2 programs ran.
Access to the host environment of an RTL/2 program was provided via special procedure and data bricks called SVC procedures and SVC data. These were accessible in RTL/2 but implemented in some other language in the host environment.
RTL/2 compiles to assembly language and provides the CODE statement to allow including assembly language in RTL/2 source code. This is only available when compiled with a systems programming option (CN:F)
The CODE statement takes two operands: the number of bytes used by the code insert and the number of bytes of stack used.
Within code statements two trip characters are used to access RTL/2 variables. These vary between different operating systems. On a Digital Equipment Corporation (DEC) PDP-11 running RSX-11M, and a VAX running VMS, the trip characters are * and /.
While the specifics varied by operating system the following is an example of a code insert on VAX/VMS:
This code insert moves the value of a variable passed into the RTL/2 procedure into a variable named COUNTER in a data brick named MYDATA.
SPL published a range of documentation for RTL/2. Each such document was assigned a reference number. The following is an incomplete list.
Barnes, J.G.P. (September 1980). "The Standardisation of RTL/2". Software: Practice and Experience. 10 (9). Wyley: 707–719. doi:10.1002/spe.4380100904. S2CID 5050804. /wiki/Doi_(identifier) ↩
RTL/2 Language Specification ↩
"The Encyclopedia of Computer Languages". Archived from the original on 10 March 2011. https://web.archive.org/web/20110310112048/http://hopl.murdoch.edu.au/showlanguage2.prx?exp=596 ↩
Barnes, J.G.P. (1 January 1976). RTL/2 design and philosophy. Heyden. ISBN 978-0855012243. 978-0855012243 ↩
BS 5904:1980: Specification for computer programming language RTL/2. 30 September 1980. ISBN 978-0580114410. {{cite book}}: |website= ignored (help) 978-0580114410 ↩