[fpc-devel]urgent: double + integer question/types in calculations

Jonas Maebe jonas at zeus.rug.ac.be
Wed Feb 6 19:37:21 CET 2002


On Wed, 6 Feb 2002, Konstantin Muenning wrote:

> By the way, about types in calculations and assignments. What types are
> used in FPC for doing the actual calculations.

All binary expressions are evaluated as

a) extended if one of the operands is a floating point type (single,
real/double, extended)
b) qword if both are qword
c) int64 if one of them is an int64, or if one is cardinal and the other
is signed and range or overflow checking is on
d) cardinal if both are cardinal
e) longint in all other cases (so word + word is evaluated as longint)


Jonas





More information about the fpc-devel mailing list