next up previous contents
Next: Integer Division Up: Mixing Objects of Different Previous: Mixed Type Numeric Expressions

Mixed Type Assignment

Problems often occur with mixed-type arithmetic; the rules for type conversion are given below.

For example,

    REAL a, b; INTEGER i, j
    a = 3.0; b = 4.0
    i = b - a
    j = -0.9
    a = j

For more information, click here gif


next up previous contents
Next: Integer Division Up: Mixing Objects of Different Previous: Mixed Type Numeric Expressions

Adam Marshall ©University of Liverpool, 1996
Fri Dec 6 18:56:08 GMT 1996
Not for commercial use.