f78
Modula-2
Integral types consist of
Character types consist of
Floating-point types consist of
Pointer types consist of anything declared as
Scalar types consist of all of the previous types.
Set types consist of
Boolean types consist of
The following operators are supported, and appear in order of increasing
precedence:
/
Warning:
All , Modula-2 built-in procedures also return a result, described by the
following.
Warning:
Integer constants are simply a sequence of digits. When used in an expression,
a constant is interpreted to be type-compatible with the rest of the
expression. Hexadecimal integers are specified by a trailing
Floating point constants appear as a sequence of digits, followed by a decimal
point and another sequence of digits. An optional exponent can then be
specified, in the form
Character constants consist of a single character enclosed by a pair of like
quotes, either single (
String constants consist of a sequence of characters enclosed by a pair of
like quotes, either single (
Enumerated constants consist of an enumerated identifier.
Boolean constants consist of the identifiers
Pointer constants consist of integral values only.
Set constants are not yet supported.
If you allow GDB to set the language automatically, then entering code
compiled from a file whose name ends with
Unlike in standard Modula-2, pointer constants can be formed by integers. This
allows you to modify pointer variables during debugging. (In standard
Modula-2, the actual address contained in a pointer variable is hidden from you; it can
only be modified through direct assignment to another pointer variable or
expression that returned a pointer.)
C escape sequences can be used in strings and characters to represent
non-printable characters. GDB prints out strings with these escape sequences embedded.
Single non-printable characters are printed using the
The assignment operator (
All built-in procedures both modify and return their argument.
GDB considers two Modula-2 variables type equivalent if:
They are of types that have been declared equivalent via a
They have been declared on the same line.
Note: This is true of the GNU Modula-2 compiler, but it may not be true of other compilers.)
As long as type checking is enabled, any attempt to combine variables whose
types are not equivalent is an error. Range checking is done on all mathematical
operations, assignment, array index bounds, and all built-in functions and
procedures.
scope
Using the
The
In GDB scripts, the Modula-2 inequality operator # is interpreted as the
beginning of a comment. Use <> instead.
Function argument or array index separator.
Assignment. The value of var :=value is value.
Less than, greater than on integral, floating-poin
ffb
t, or enumerated types.
Less than, greater than, less than or equal to, greater than or equal to on
integral, floating-point and enumerated types, or set inclusion on set types.
Same precedence as <.
Equality and two ways of expressing inequality, valid on scalar types. Same
precedence as <. In GDB scripts, only <> is available for inequality, since # conflicts with the script comment character.
Set membership. Defined on set types and the types of their members. Same
precedence as <.
Boolean disjunction. Defined on boolean types.
Boolean conjuction. Defined on boolean types.
The GDB artificial array operator (see Expressions).
Addition and subtraction on integral and floating-point types, or union and
difference on set types.
Multiplication on integral and floating-point types, or set intersection on
set types.
Division on floating-point types, or symmetric set difference on set types.
Same precedence as
Integer division and remainder. Defined on integral types. Same precedence as
*.
Negative. Defined on INTEGER and REAL data.
Pointer dereferencing. Defined on pointer types.
Boolean negation. Defined on boolean types. Same precedence as .
RECORD field selector. Defined on RECORD data. Same precedence as .
Array indexing. Defined on ARRAY data. Same precedence as .
Procedure argument list. Defined on PROCEDURE objects. Same precedence as .
GDB and Modula-2 scope operators.
Sets and their operations are not yet supported, so GDB treats the use of the
operator,
represents an ARRAY variable.
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 be 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.
ffb
represents a variable.
represents a variable or constant of one of many types. See the explanation of
the function for details.
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. Returns the new value.
Decrements the value in the variable v by i. Returns the new value.
Removes the element m from the set s. Returns the new set.
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. Returns the new value.
Increments the value in the variable v by i. Returns the new value.
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.
Sets and their operations are not yet supported, so GDB treats the use of
procedures
In this release, GDB does not yet perform type or range checking.
scope :: id