next up previous contents
Next: Mixed Type Assignment Up: Mixing Objects of Different Previous: Mixing Objects of Different

 

Mixed Type Numeric Expressions

In the CPU calculations must be performed between objects of the same type, so if an expression mixes type some objects must change type.

Default types have an implied ordering:

  1. INTEGER -- lowest
  2. REAL
  3. DOUBLE PRECISION
  4. COMPLEX -- highest

The result of an expression is always of the highest type, for example,

The actual operator is unimportant.

For more information, click here gif


next up previous contents
Next: Mixed Type Assignment Up: Mixing Objects of Different Previous: Mixing Objects of Different

©University of Liverpool, 1997
Wed May 28 23:37:18 BST 1997
Not for commercial use.