| ||Definition:|| |
(Basic CPL) A British systems language developed by Richards in 1969 and descended from cpl (Combined Programming Language). BCPL is low-level, typeless and block-structured, and provides only one-dimensional arrays. Case is not significant, but conventionally reserved words begin with a capital. Flow control constructs include: If-Then, Test-Then-Else, Unless-Do, While-Do, Until-Do, Repeat, Repeatwhile, Repeatuntil, For-to-By-Do, Loop, Break and Switchon-Into-Case-Default-Endcase. BCPL has conditional expressions, pointers, and manifest constants. It has both procedures: 'Let foo(bar) Be command' and functions: 'Let foo(bar) = expression'. 'Valof $(..Resultis..$)' causes a compound command to produce a value. Parameters are call-by-value.
Program segments communicate via the global vector where system and user variables are stored in fixed numerical locations in a single array.
The first BCPL compiler was written in aed. BCPL was used to implement the tripos operating system, which was subsequently reincarnated as amigados.
["BCPL - The Language and its Compiler", Martin Richards & Colin Whitby-Stevens, Cambridge U Press 1979].
See ocode, intcode.
Oxford BCPL differed slightly: Test-Ifso-Ifnot, and section brackets in place of $( $).
The original intcode interpreter for BCPL is available for amiga, unix, ms-dos .
A BCPL compiler bootstrap kit with an intcode interpreter in c was written by Ken Yap <firstname.lastname@example.org>.