[Lazarus] Warning about integer constant and expression

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Feb 23 19:42:35 CET 2016


On Tue, 23 Feb 2016 18:28:29 +0100
Jürgen Hestermann <juergen.hestermann at gmx.de> wrote:

> WIth this definition:
> 
> var  i64 : Int64;
> 
> and this code:
> 
> if i64>High(SizeInt) then
> 
> I get:
> "Warning: Comparison might be always false due to range of constant and expression"
> And even more strange, if I convert the constant to int64 as in
> 
> if i64>int64(High(SizeInt)) then
> 
> I still get this warning.
> Why?

Because on a 64bit system SizeInt = int64.

Mattias




More information about the Lazarus mailing list