Skip to content

Page 1

ND 10309 PLANC for ND-100

ND 10310 PLANC for ND-500

INTRODUCTION

PLANC (Programming Language for ND Computers) is designed as a high-level systems programming language. It is a member of the ALGOL/PASCAL family of block structured language. PLANC is used mainly for writing systems software such as operating systems and compilers, and it has been defined in a machine-independent manner.

FEATURES

  • System Software machine independent
  • Designed as High Level Language for System Software Development
  • Easier to develop systems
  • Easier to maintain systems
  • No restrictions on new features
  • Inline assembly code

PRODUCT DESCRIPTION

PLANC programs are structured into modules and routines; the routine concept is broad compared with other programming languages.

PLANC supports a variety of data types, which are divided into the categories of simple and composite.

Simple Data Types

TYPE DESCRIPTION
INTEGER 8-bit, 16-bit and 32-bit possible lengths.
REAL 32-bit, 48-bit and 64-bit possible lengths.
BOOLEAN 16-bits, 1 bit packed.
ENUMERATION Enables a data element to take any value from an explicitly specified ordered group.
POINTER Address of simple or composite data-element.
LABEL Statement labels.
VOID Denotes absence of a data-element in a routine declaration.

Composite Data Types

  • ARRAY: A group of elements, all of the same data type.
  • RECORD: A group of elements, of various data type.
  • SET: The usual mathematical notion, whose members may be integers or enumeration values.
  • ROUTINE: Allows declaration of a group of routines with similar structure or characteristics, in the same way as for other data-elements. Different types of routines are INLINE/STANDARD/REFERENCE/SPECIAL.

Some data types may be modified. Integers may have a value range declared. Reals may have a number of digits precision declared. Data-elements of any data type can be <access modifier>. READ modification makes the data-element read-only and WRITE modification makes a data-element write-only, of interest to protect parameters in routines which are to send/return values into/out of the routine.

TYPE Specifications

Type specifications are for user-defined data types. A new data type must be specified in terms of simple, composite, predefined or other newly defined data types. Operators available for a user defined data type are either those available for the base data type or new operators provided by user-supplied routines.

Expressions

Expressions in the usual way form data-elements as operands and operators. One unusual feature is that there is no assignment statement. PLANC has assignment operators. There can be one or more assignment operators in one expression, causing one or more values to be stored during expression evaluation.

Arithmetic operators include +, -, *, / and * with their usual mathematical meaning. Further arithmetic operators are ABS – absolute value, MOD – give one number modulo another number, and SHIFT – left/right bit shift.


Page 2

PLANC Sequence Control Statements

Logical operators include NOT - logical complement (set negation), AND - logical and (set intersection), OR - inclusive or (set union) and XOR - exclusive or (set difference).

The relational operators include =, >, < (not equal), >=, <=, <, <=, and IN (set membership).

PLANC has the following sequence control statements:

  • GO specifies an unconditional change of sequence to a declared label.
  • IF specifies a conditional change of sequence. There may be multiple ELSEIF and an ELSE part within an IF statement.
  • CASE multiple choice conditional change of sequence based on the possible values of a data-element of an integer or enumeration data type.
  • DO - ENDDO is never-ending loop, of particular use for process control or real-time applications.
  • FOR - ENDFOR loops cause repetitive execution of a group of statements, a number of times depending on the FOR list specified.
  • WHILE will allow repetitive execution of a DO - ENDDO or a FOR - ENDFOR loop, until a particular condition becomes true.
  • ASSERT will cause a run-time error to occur if a specified condition is not true.

Routines

The routine is the equivalent of a subprogram/procedure or other high-level languages. PLANC routines have an explicit in-value data-element and an explicit out-value data-element. The routine declaration contains the data types of the in-value, out-value and any parameters declared. Exit from a routine is normally effected by a RETURN statement. There is a number of standard routines.

Modules

Modules are the smallest program unit which can be compiled and executed. A program to be executed must have one module containing a program special routine, which will be the entry point at the beginning of execution. Routines may be grouped into modules, e.g. to collect related functions within a large system. Data-elements, including routines, in one module may be accessed from another module by the use of EXPORT/IMPORT statements. Thus, only by explicit permission, can data-elements be seen outside the module in which they are created. The IMPORT statement repeats the declaration of the data-element, so in order to use an external data-element successfully, complete knowledge of the data-element is necessary. Modules may be compiled separately, facilitating convenient development of large systems, broken up into manageable parts.

Documentation

PLANC Reference Manual ....... ND-60.117

Contact Information

Location Contact Information
Oslo tel. 02-903900, tix. 18661 nd n
Bergen tel. 05-225090
Sandnes tel. 04-66554
Tromsø tel. 083-75766
Stockholm tel. 010-798000, tix. 15255 nordata s
Gothenburg tel. 031-496760
Malmø tel. 040-79750, 3725 nord dk
Copenhagen tel. 02-425455
Wiesbaden tel. 06127-4451, tix. 487963 nordata n
Paris tel. 62283636, 348573 nordata ferrv
Lyon tel. 873-47777, 78739106 nd paris
Newbury tel. 0635-31566, tix. 894819 norsk gl
Boston tel. (617) 237-7945, tix. 921740 norsk well

Note: Norsk Data reserves the right to change specifications without notice.