Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2014-04

Range check with array of const, and dword?

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin Frb

Is the following supposed to give a range check? 2.6.4 on win

The value is correct for a DWord.

program Project1;
{$R+}
uses sysutils;
var
   n: DWORD;
   s: String;
begin
   n := $C2001122;
   s := Format('%x', [n]);   // <<<< range check here
   writeln(s);
   readln;
end.

Reply by email

Jonas Maebe
to Martin Frb
Martin Frb wrote
Is the following supposed to give a range check? 2.6.4 on win

Yes. There is no seperate "vtDword" type, only vtInteger, vtInt64 and vtQWord. The compiler picks vtInteger for Delphi compatibility.

Jonas

Reply by email