Download O - Defense Technical Information Center

Transcript
15
V
\>^
VARIABLE
>v
TYPE
EXPRESSION^V.
TYPE
\
REAL
FIXED
INTEGER
REAL
Real
Fixed
Integer
(rounded)
FIXED
Real
Fixed
—
INTEGER
Real
—
—
—
*
BOOL.
BOOL.
*
—
Integer
—
—
Bool.
The assignment statement may in fact be an expression if it is nested.
This
facilitates multiple or intermediate stores. For example,
1 - A - B;
assigns the value 1 to both A and B.
The subword form may be used as a variable in an assignment statement.
Example:
INTEGER X;
•
3 - X (1 "• 4);
A special case of the assignment statement is the sub-matrix store
command.
Example:
M x N - M (3,5);
The matrix expression on the left will replace the sub-matrix of M whose
upper left-hand element is in row 3, column 5. If the new sub-matrix will
not fit into the indicated space, an error will be indicated at run-time.
No check is made for overflow: strange things may occur if a REAL number
larger than or equal to 1.0 is converted to a FIXED.