[fpc-devel] Bug #0021641: Array of const gives check range error
Jonas Maebe
jonas.maebe at elis.ugent.be
Wed Apr 4 00:57:20 CEST 2012
On 03 Apr 2012, at 20:27, patspiper wrote:
> The following is related to bug #0021641 (Array of const gives check range error).
>
> Is it correct for the exception to manifest itself in the dword case and not the qword one?
>
> writeln(Format('%d', [qword(qword(High(Int64))+1)])); //ok
> writeln(Format('%d', [dword(dword(High(integer))+1)])); //exception
Yes, it's correct, because as mentioned in the bug report tvarrec can hold a qword, but not a dword (and dword must be passed as 32 bit = longint for Delphi compatibility).
Jonas
More information about the fpc-devel
mailing list