An environment enquiry is a kind of procedure defined in the standard prelude whose purpose is to provide information about the properties of the particular implementation used to compile the program.
Procedures implementing environment enquiries do not take any argument
and yield a value of some appropriate mode. For example, the
max int environment enquiry yields a value of mode
int, whereas null character yields a value of mode
char.
The section 10.2.1 of the Revised Report defines the environment enquiries that a conforming implementation must provide. These are:
int int lenghts1 plus the number of extra lenghts of integers. This determines how
many long entries in a longsety preceding
int are meaningful in the implementation.
int int shorts1 plus the number of extra shorts of integers. This determines how
many short entries in a shorsety preceding
int are meaningful in the implementation.
sizety int sizety max intThe largest sizety integral value.
int real lengths1 plus the number of extra lenghts of real numbers. This determines
how many long entries in a longsety preceding
real are meaningful in the implementation.
int real shorts1 plus the number of extra shorts of real numbers. This determines
how many short entries preceding real in a
shortsety are meaningful in the implementation.
sizety real sizety max realThe largest sizety real value.
sizety real sizety small realThe smallest sizety real value such that both sizety 1
+ sizety small real > sizety 1 and sizety 1 -
sizety small real < sizety 1.
int bit lengths1 plus the number of extra longs of bits. This determines how many
long entries in a longsety preceding
bits are meaningful in the implementation.
bin bit shorts1 plus the number of extra shorts of bits. This determines how many
short entries in a shortsety preceding
bits are meaningful in the implementation.
int sizety bits widthThe number of elements in a value of mode sizety bits.
int bytes lenghts1 plus the number of extra longs of bytes. This determines how many
long entries in a longsety preceding
bytes are meaningful in the implementation.
int bytes shorts1 plus the number of extra shorts of bytes. This determines how many
short entries in a shortsety preceding
bytes are meaningful in the implementation.
int sizety bytes widthThe number of elements in a value of mode sizety bytes.
op abs = (char a) intThe integral equivalent of the character a.
op repr = (int a) charThat character x, if it exists, for hich abs x = a.
int max abs charThe largest integral equivalent of a character.
char null characterSome character.
char flipThe character used to represent true during transput.
char flopThe character used to represent false during transput.
char errorcharThe character used to represent unconvertible arithmetic values.
char blankThe blank character.