[fpc-pascal]integer + double question

Michael Van Canneyt michael.vancanneyt at wisa.be
Wed Feb 6 09:21:14 CET 2002


On Tue, 5 Feb 2002, raoul s wrote:

> I have "a1: double" and "b1: integer". are these
> valid:
> a1 := (round)b1;

No.
  b1:=round(a1);
would be valid.

> and then;
> a1 := a1 + b1;

This is always possible; the compiler will convert b1 to a double before
adding it.

Michael.





More information about the fpc-pascal mailing list