next up previous contents index
Next: Arithmetic Constant Expressions Up: Arithmetic Expressions Previous: Integer Division

Restrictions

Certain arithmetical operations are prohibited because their results are not mathematically defined. For example dividing by zero, raising a negative value to a real power, and raising zero to a negative power. The Fortran Standard does not specify exactly what is to happen if one of these errors occurs: most systems issue an error message and abort the program.

Errors can also occur because numbers are stored on a computer with finite range and precision. The results of adding or multiplying two very large numbers may be outside the number range: this is called overflow. A similar effect on very large negative integers is called underflow. Most systems will issue a warning message for overflow or underflow, and may abort the program, but some processors cannot detect errors of this sort involving integer arithmetic.

Every operand (variable, array element, or function reference) used in an expression must have a defined   value at the time the expression is evaluated. Note that variables and arrays are initially undefined unless a suitable DATA statement is used. Expressions must not include references to any external functions with side effects on other operands of the expression: see section 9.3 for more details.


next up previous contents index
Next: Arithmetic Constant Expressions Up: Arithmetic Expressions Previous: Integer Division
Helen Rowlands
8/27/1998