HP FORTRAN 77 Language Operators [ Symbolic Debugger/iX User's Guide ] MPE/iX 5.0 Documentation
Symbolic Debugger/iX User's Guide
HP FORTRAN 77 Language Operators
The following table lists the supported HP FORTRAN 77 operators.
Operators are listed in order of precedence, from highest to lowest. All
operators listed in the same box are of equal precedence. All operators
of equal precedence evaluate left to right, except assignment.
Assignment is treated by the debugger as an operator.
Associativity of operators in the following table is from left to right,
unless otherwise stated.
Complex variables in HP FORTRAN 77 are not supported except as a pair of
two separate reals or doubles. Any HP C language operators that do not
clash with supported HP FORTRAN 77 operators can be used in HP FORTRAN 77
expressions, with the corresponding C interpretation. The only exception
to this is the unary operator sizeof.
HP FORTRAN 77 Language Operators
Table C-1. Language Operators for HP FORTRAN 77
---------------------------------------------------------------------------------------------
| | |
| Operator | Operation |
| | |
---------------------------------------------------------------------------------------------
| | |
| ( ) | parentheses (grouping), array member |
| | selection |
| | |
---------------------------------------------------------------------------------------------
| | |
| * | multiplication |
| | |
| / | division |
| | |
---------------------------------------------------------------------------------------------
| | |
| + | addition |
| | |
| - | subtraction or unary negation |
| | |
---------------------------------------------------------------------------------------------
| | |
| .LT. | relational less than |
| | |
| .LE. | relational less than or equal to |
| | |
| .EQ. | relational equal to |
| | |
| .GE. | relational greater than or equal to |
| | |
| .NE. | relational not equal to |
| | |
| .GT. | relational greater than |
| | |
---------------------------------------------------------------------------------------------
| | |
| .NOT. | logical negation |
| | |
---------------------------------------------------------------------------------------------
| | |
| .AND. | logical and |
| | |
---------------------------------------------------------------------------------------------
| | |
| .OR. | logical or |
| | |
---------------------------------------------------------------------------------------------
| | |
| .EQV. | logical equivalence |
| | |
| .NEQV. | logical nonequivalence |
| | |
---------------------------------------------------------------------------------------------
| | |
| = (order is right to left) | assignment |
| | |
---------------------------------------------------------------------------------------------
| | |
| Special operators: | |
| | |
| $addr | unary address of an object |
| | |
| $sizeof | unary size of an object |
| | |
| $in | unary suspended in named routine |
| | |
---------------------------------------------------------------------------------------------
VMS FORTRAN Records
HP Symbolic Debugger provides support for VMS FORTRAN records. There are
four associated types:
* structures
* records
* unions
* maps
A structure defines record field types such as in the following example:
structure /date/
integer a
union
map
integer b
real c
character*8 d
integer e
union
map
logical f
integer g
end map
map
character*3 h
end map
map
real i
end map
end union
end map
end union
real j
integer f
end structure
A record corresponds to an instance of that record structure.
For example, given the previous structure, you can now define a record
with that structure:
record /date/ rec1
In HP Symbolic Debugger, HP FORTRAN 77 records are treated as HP FORTRAN
77 structures from the debugger. This means that if you use the print
command with the \t format to look at a record, you will see the record's
structure rather than the record definition, record /date/ rec1.
For example, if you type:
>p rec1\t
you will get:
structure /date/
integer a
union
map
integer b
real c
character*8 d
integer e
union
map
logical f
integer g
end map
map
character*3 h
end map
map
real i
end map
end union
end map
end union
real j
integer f
end structure rec1
You can access any element within a record. Because maps and unions are
unnamed, they are ignored in naming subelements. For example, field h in
the previous example must be accessed as:
rec1.h
If there is any ambiguity among field names, the first one appearing by a
given name is chosen, just as it is in HP FORTRAN 77. For example, field
rec1.f in the example above is of type logical, not integer.
When the value or type of any field in a record is displayed, its
individual format is identical to what it would be if it were not within
a record. For the records, unions, and maps themselves, these keywords
are used identically to the way they are used in HP FORTRAN 77 except:
* When printing the type of a structure, its name will follow the
entire structure instead of preceding it.
For example:
>p rec\t
gives you this:
structure
integer*4 i
end structure rec
* When printing the value of a structure, its name and an equal sign
(=) precede its value.
For example:
>p rec
gives you this:
rec = structure
i = 3
end structure
MPE/iX 5.0 Documentation