1. Home
  2. Procedure


This is a structure that contains Genstat statements, and fulfils the role of the subroutine in the Genstat language. The use of a procedure looks just like the use of a Genstat directive. All data structures within the procedure are local (i.e. they cannot be referenced, or confused, with data structures outside the procedure); input and output structures for the procedure are defined by option and parameter settings in the procedure call.

Procedure name

is a letter followed by letters and/or digits. Procedure names can be defined with up to 32 characters; if more than 32 are given, characters 33 onwards are ignored. The case of the letters (small or capital) is also ignored. When using a procedure, the name can be abbreviated to as few as four characters, provided there is no ambiguity with the names of directives or other procedures. Directives and procedures in the official Genstat library are all defined to have names that are distinct within the first four characters so there should be no problem unless you (or your site) have defined procedures with ambiguous names. If so, Genstat selects the command to use according to the following order of priority: directives, user-defined procedures, procedures in libraries attached by the user (in order of channel number), procedures in the site library, and procedures in the official library.

Updated on February 25, 2019

Was this article helpful?