PLANC - PLANC Data Types

PLANC Data Types

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:

  • Simple types
    INTEGER, REAL, BOOLEAN, LABEL, VOID, ENUMERATION, 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 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).

Access modifiers can be applied to make them READ or WRITE only.

For string data several predefined datatypes are used, they are:

  1. . BYTE Contains a single character
  2. . BYTES Contains character strings
  3. . 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 such an "interesting" language much less tempting to write.

Read more about this topic:  PLANC

Famous quotes containing the words data and/or types:

    Mental health data from the 1950’s on middle-aged women showed them to be a particularly distressed group, vulnerable to depression and feelings of uselessness. This isn’t surprising. If society tells you that your main role is to be attractive to men and you are getting crow’s feet, and to be a mother to children and yours are leaving home, no wonder you are distressed.
    Grace Baruch (20th century)

    The American man is a very simple and cheap mechanism. The American woman I find a complicated and expensive one. Contrasts of feminine types are possible. I am not absolutely sure that there is more than one American man.
    Henry Brooks Adams (1838–1918)