[fpc-pascal]Bug or not Bug

Peter Vreman peter at freepascal.org
Thu Mar 11 13:18:11 CET 2004

> Round returns a longint. The range of a longint is -2^31 .. (2^31-1).
> The result you had (2^31) doesn't fit in a longint, so this is not a fpc
> bug.
> As I don't have Delphi, I don't know why Delphi doesn't give an error. It
> could
> be that the Delphi's return value is int64 or cardinal. Or it simply
> doesn't
> care about the overflow. What happens in delphi if the formatstring is '%d
> %d'?

FPC 1.9.x has round() that supports int64.

More information about the fpc-pascal mailing list