next up previous contents
Next: Integer Division Up: Mixing Types Previous: Mixed-Type Expressions   Contents

Mixed-Type Assignement

In an assignment

{}
LHS=RHS,
where LHS and RHS have different types, the RHS expression is evaluated first using RHS type arithmetic; the result is then converted to the type of LHS.

Explicit type conversions are to be preffered to automatic ones. For example, the real to integer conversion is automatically done by truncation toward 0 (similar to INT intrinsic).



Adrian Sandu 2001-08-26