Debugging with GDB
126.96.36.199 Built-in functions and procedures
Modula-2 also makes available several built-in procedures and functions.
In describing these, the following metavariables are used:
- represents an
- represents a
CHAR constant or variable.
- represents a variable or constant of integral type.
- represents an identifier that belongs to a set. Generally used in the
same function with the metavariable s. The type of s should
SET OF mtype (where mtype is the type of m).
- represents a variable or constant of integral or floating-point type.
- represents a variable or constant of floating-point type.
- represents a type.
- represents a variable.
- 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.
- Returns the absolute value of n.
- If c is a lower case letter, it returns its upper case
equivalent, otherwise it returns its argument.
- Returns the character whose ordinal value is i.
- Decrements the value in the variable v by one. Returns the new value.
- Decrements the value in the variable v by i. Returns the
- Removes the element m from the set s. Returns the new
- Returns the floating point equivalent of the integer i.
- Returns the index of the last member of a.
- Increments the value in the variable v by one. Returns the new value.
- Increments the value in the variable v by i. Returns the
- Adds the element m to the set s if it is not already
there. Returns the new set.
- Returns the maximum value of the type t.
- Returns the minimum value of the type t.
- Returns boolean TRUE if i is an odd number.
- 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). x must be of an ordered type, which include
integral, character and enumerated types.
- Returns the size of its argument. x can be a variable or a type.
- Returns the integral part of r.
- 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