PLANC (pronounced as "plank") is a high level computer programming language. The acronym stands for Programming LAnguage for Nd Computers.
Compilers were developed by Norsk Data for several architectures, including the Motorola 68000, 88000, x86, and the Norsk Data NORD-10 minicomputer architecture and ND-500 superminicomputer.
The language was designed to be platform independent. It was mainly used internally at Norsk Data for writing high level systems software such as the upper parts of the operating systems and compilers.
PLANC programs are structured into modules and routines.
A very simple example of a PLANC program is as follows:
A difference from popular programming languages is that the assignment operator goes from left to right: First you compute the value, then you store it. Compile-time initialization of variables, on the other hand, went from right to left.
The assignment operator returns the stored value, so you could store it multiple times: 5 =: a =: b would store 5 into both the A and B variables. It shares this direction with Plankalkül, ALGOL 60, and Mary, another little known programming language developed in Norway, but also the popular C programming language.
A related distinct syntactic feature is that a function can be defined to take as input the computed value of the expression on its left side. Also, a single additional argument does not require surrounding parentheses. The resulting infix notation blurs the syntactical difference between functions and operators. Such expressions seem conceptually as having a computed value flowing from left to the right.
As with all high level languages PLANC uses variables as can be seen in the previous sample, here are the allowed data types within PLANC:
An enumeration was declared thus:
This defines an enumeration of the seasons and sets the default value to Summer.
LABEL is a little different from your normal data type, this is used to pre-define a label within code and is used in conjunction with a GO statement (very much like GOTO in BASIC).