PLANC - PLANC Basic Structure

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 ENDMODULE

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, 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 difference between classical music and jazz is that in the former the music is always greater than its performance—Beethoven’s Violin Concerto, for instance, is always greater than its performance—whereas the way jazz is performed is always more important than what is being performed.
    André Previn (b. 1929)

    There is no such thing as a language, not if a language is anything like what many philosophers and linguists have supposed. There is therefore no such thing to be learned, mastered, or born with. We must give up the idea of a clearly defined shared structure which language-users acquire and then apply to cases.
    Donald Davidson (b. 1917)