gdb: Built-In Func/Proc
15.4.9.2 Built-in Functions and Procedures
..........................................
Modula-2 also makes available several built-in procedures and functions.
In describing these, the following metavariables are used:
A
represents an 'ARRAY' variable.
C
represents a 'CHAR' constant or variable.
I
represents a variable or constant of integral type.
M
represents an identifier that belongs to a set. Generally used in
the same function with the metavariable S. The type of S should be
'SET OF MTYPE' (where MTYPE is the type of M).
N
represents a variable or constant of integral or floating-point
type.
R
represents a variable or constant of floating-point type.
T
represents a type.
V
represents a variable.
X
represents a variable or constant of one of many types. See the
explanation of the function for details.
All Modula-2 built-in procedures also return a result, described
below.
'ABS(N)'
Returns the absolute value of N.
'CAP(C)'
If C is a lower case letter, it returns its upper case equivalent,
otherwise it returns its argument.
'CHR(I)'
Returns the character whose ordinal value is I.
'DEC(V)'
Decrements the value in the variable V by one. Returns the new
value.
'DEC(V,I)'
Decrements the value in the variable V by I. Returns the new
value.
'EXCL(M,S)'
Removes the element M from the set S. Returns the new set.
'FLOAT(I)'
Returns the floating point equivalent of the integer I.
'HIGH(A)'
Returns the index of the last member of A.
'INC(V)'
Increments the value in the variable V by one. Returns the new
value.
'INC(V,I)'
Increments the value in the variable V by I. Returns the new
value.
'INCL(M,S)'
Adds the element M to the set S if it is not already there.
Returns the new set.
'MAX(T)'
Returns the maximum value of the type T.
'MIN(T)'
Returns the minimum value of the type T.
'ODD(I)'
Returns boolean TRUE if I is an odd number.
'ORD(X)'
Returns the ordinal value of its argument. For example, the
ordinal value of a character is its ASCII value (on machines
supporting the ASCII character set). The argument X must be of an
ordered type, which include integral, character and enumerated
types.
'SIZE(X)'
Returns the size of its argument. The argument X can be a variable
or a type.
'TRUNC(R)'
Returns the integral part of R.
'TSIZE(X)'
Returns the size of its argument. The argument X can be a variable
or a type.
'VAL(T,I)'
Returns the member of the type T whose ordinal value is I.
_Warning:_ Sets and their operations are not yet supported, so GDB
treats the use of procedures 'INCL' and 'EXCL' as an error.