PLANC
   HOME

TheInfoList



OR:

PLANC (Programming LAnguage for Nd Computers, pronounced as ''plank'') is a
high-level programming language In computer science, a high-level programming language is a programming language with strong Abstraction (computer science), abstraction from the details of the computer. In contrast to low-level programming languages, it may use natural language ...
.
Compiler In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs that ...
s were developed by
Norsk Data Norsk Data was a minicomputer manufacturer located in Oslo, Norway. Existing from 1967 to 1998, it had its most active period from the early 1970s to the late 1980s. At the company's peak in 1987, it was the second largest company in Norway and em ...
for several architectures, including the
Motorola 68000 The Motorola 68000 (sometimes shortened to Motorola 68k or m68k and usually pronounced "sixty-eight-thousand") is a 16/32-bit complex instruction set computer (CISC) microprocessor, introduced in 1979 by Motorola Semiconductor Products Sector ...
,
88000 The 88000 (m88k for short) is a RISC instruction set architecture developed by Motorola during the 1980s. The MC88100 arrived on the market in 1988, some two years after the competing SPARC and MIPS. Due to the late start and extensive delays re ...
, Intel
x86 x86 (also known as 80x86 or the 8086 family) is a family of complex instruction set computer (CISC) instruction set architectures initially developed by Intel based on the Intel 8086 microprocessor and its 8088 variant. The 8086 was introd ...
, and the Norsk Data
Nord-10 Nord-10 was a medium-sized general-purpose 16-bit computing, 16-bit minicomputer designed for multilingual time-sharing applications and for real-time computing, real-time multi-program systems, produced by Norsk Data. It was introduced in 1973. T ...
minicomputer A minicomputer, or colloquially mini, is a class of smaller general purpose computers that developed in the mid-1960s and sold at a much lower price than mainframe and mid-size computers from IBM and its direct competitors. In a 1970 survey, ...
s and
ND-500 The ND-500 was a 32-bit superminicomputer delivered in 1981 by Norsk Data. It relied on a ND-100 to do housekeeping tasks and run the OS, SINTRAN III. A configuration could feature up to four ND-500 CPUs in a shared-memory configuration. Hardwa ...
superminicomputer A superminicomputer, colloquially supermini, is a high-end minicomputer. The term is used to distinguish the emerging 32-bit architecture midrange computers introduced in the mid to late 1970s from the classical 16-bit systems that preceded the ...
. The language was designed to be
cross-platform software In computing, cross-platform software (also called multi-platform software, platform-agnostic software, or platform-independent software) is computer software that is designed to work in several computing platforms. Some cross-platform software r ...
. It was mainly used internally at Norsk Data for writing high level systems software such as the upper parts of
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
s and compilers.


Basic structure

PLANC programs are structured into modules and routines. A very simple example of a PLANC program is as follows: MODULE mod INTEGER ARRAY : stack (0:100) PROGRAM : mprog INTEGER : i, j,k, m INISTACK stack 1 =: i 2 =: j i+j =: k =: m ENDROUTINE ENDMODULE A difference from popular programming languages is that the assignment operator evaluates from left to right: First it computes the value, and then stores it. Compile-time initialization of variables, in contrast, evaluates from right to left. The assignment operator returns the stored value, so it can be stored multiple times: 5 =: a =: b would store 5 into both the A and B variables. It shares this direction with
Plankalkül Plankalkül () is a programming language designed for engineering purposes by Konrad Zuse between 1942 and 1945. It was the first high-level programming language to be designed for a computer. ''Kalkül'' is the German term for a formal systemâ ...
,
ALGOL 60 ALGOL 60 (short for ''Algorithmic Language 1960'') is a member of the ALGOL family of computer programming languages. It followed on from ALGOL 58 which had introduced code blocks and the begin and end pairs for delimiting them, representing a k ...
,
Mary Mary may refer to: People * Mary (name), a feminine given name (includes a list of people with the name) Religious contexts * New Testament people named Mary, overview article linking to many of those below * Mary, mother of Jesus, also calle ...
(another little known language developed in Norway), and the popular language C. A related distinct syntactic feature is that a
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
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 Infix notation is the notation commonly used in arithmetical and logical formulae and statements. It is characterized by the placement of operators between operands—" infixed operators"—such as the plus sign in . Usage Binary relations a ...
blurs the
syntactic In linguistics, syntax () is the study of how words and morphemes combine to form larger units such as phrases and sentences. Central concerns of syntax include word order, grammatical relations, hierarchical sentence structure (constituency), ...
difference between functions and
operators Operator may refer to: Mathematics * A symbol indicating a mathematical operation * Logical operator or logical connective in mathematical logic * Operator (mathematics), mapping that acts on elements of a space to produce elements of another sp ...
. Such expressions seem conceptually as having a computed value flowing from left to the right.


Data types

As with all high level languages, PLANC uses variables as can be seen in the prior sample, here are the allowed data types within PLANC: * Simple types *:
INTEGER An integer is the number zero (), a positive natural number (, , , etc.) or a negative integer with a minus sign (−1, −2, −3, etc.). The negative numbers are the additive inverses of the corresponding positive numbers. In the language ...
, REAL, BOOLEAN, LABEL,
VOID Void may refer to: Science, engineering, and technology * Void (astronomy), the spaces between galaxy filaments that contain no galaxies * Void (composites), a pore that remains unoccupied in a composite material * Void, synonym for vacuum, a s ...
,
ENUMERATION An enumeration is a complete, ordered listing of all the items in a collection. The term is commonly used in mathematics and computer science to refer to a listing of all of the elements of a set. The precise requirements for an enumeration (fo ...
, POINTER * Composite types *: ARRAY, RECORD, SET, ROUTINE * User defined types: declared by TYPE T = .....; An enumeration was declared thus: ENUMERATION (Winter, Spring, Summer, Autumn) : Seasons := Summer This defines an enumeration of the seasons and sets the default value to Summer. LABEL is a little different from a normal
data type In computer science and computer programming, a data type (or simply type) is a set of possible values and a set of allowed operations on it. A data type tells the compiler or interpreter how the programmer intends to use the data. Most progra ...
. This is used to predefine a label within code and is used together with a GO statement; very much like GOTO in
BASIC BASIC (Beginners' All-purpose Symbolic Instruction Code) is a family of general-purpose, high-level programming languages designed for ease of use. The original version was created by John G. Kemeny and Thomas E. Kurtz at Dartmouth College ...
. Access modifiers can be applied to make them READ or WRITE only. For string data several predefined datatypes are used, they are: # BYTE – Contains one character # BYTES – Contains character strings # BITS – Contains BIT strings Array pointers were 3-word constructs that included both the base address, the lower bound, and the higher bound of the array; this made it possible to do reliable run-time checking of array boundaries, and made the kind of ''pointer arithmetic'' that makes C a more challenging language in which to write.


Some statements

PLANC is a language in the
Pascal Pascal, Pascal's or PASCAL may refer to: People and fictional characters * Pascal (given name), including a list of people with the name * Pascal (surname), including a list of people and fictional characters with the name ** Blaise Pascal, Fren ...
family. However, it lacks the generic BEGIN END construct often found in Pascal, instead favoring forms like ROUTINE..ENDROUTINE or DO..ENDDO etc. One feature that sets it apart from some other languages is the construction of loops: DO .... loop statements... ENDDO Hopefully one or more of the loop statements would be WHILE condition that allowed breaking out of the loop. For example: DO WHILE test ..... ENDDO Is similar to a C while (test) loop. Another example: DO ..... WHILE test ENDDO Is similar to a C do while (test). loop. Sometimes programmers wrote: DO WHILE test1 ..... WHILE test2 ENDDO C would require writing something like while (test1) . For loops have the following structure: FOR var IN low:high DO .... loop statements.... ENDDO A step can also be specified by low:high:step. Alternatively, a type (enumeration or integer ranged type) can be specified to specify a loop over a range of values or a set to loop over all elements of the set or an array can be specified to loop over an array. A pointer:next can be specified, to walk through a list. For example, if defining: TYPE node = RECORD node POINTER : next T : some_data ENDRECORD Can be written: FOR p IN first:next DO ..... ENDFOR to loop over the list. A ''for'' loop can have WHILE statements inside it. This provides two possible manners of exiting a for loop, either because the list of values are exhausted or because the test failed. Thus, blocks can written to catch each of those: routine void,node pointer (node pointer : list) for p in first:next do while p.val >< 20 exitfor return nil endfor return endroutine This returns nil if the list was exhausted but was exited due to while, it just ended up after the loop and returned the pointer to the element found. Alternatively, that could have been placed in an exitwhile block which is identical except it would end up there if and only if the while test failed. If more than one while statement occurs in the loop, it could not tell those apart, they would all make a jump to the same exitwhile block. PLANC had a primitive exception mechanism: a routine could return an exception, which was a
16-bit 16-bit microcomputers are microcomputers that use 16-bit microprocessors. A 16-bit register can store 216 different values. The range of integer values that can be stored in 16 bits depends on the integer representation used. With the two mos ...
integer value. This could then be caught by an ON ROUTINEERROR statement in the calling scope.


See also

* Nord Programming Language (NPL) *
BLISS (programming language) BLISS is a system programming language developed at Carnegie Mellon University (CMU) by W. A. Wulf, D. B. Russell, and A. N. Habermann around 1970. It was perhaps the best known system language until C debuted a few years later. Since then, C ...


References

{{Norsk Data Procedural programming languages Programming languages created in the 20th century Norsk Data software