PLANC 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 ENDMODULEA 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, early ALGOL drafts, 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.
Read more about this topic: PLANC
Famous quotes containing the words basic and/or structure:
“... the basic experience of everyone is the experience of human limitation.”
—Flannery OConnor (19251964)
“Women over fifty already form one of the largest groups in the population structure of the western world. As long as they like themselves, they will not be an oppressed minority. In order to like themselves they must reject trivialization by others of who and what they are. A grown woman should not have to masquerade as a girl in order to remain in the land of the living.”
—Germaine Greer (b. 1939)