Sign in Join

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

Mailing lists / fpc-pascal / 2020-02

Array of const: docs

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Alexey Tor.

https://www.freepascal.org/docs-html/ref/refsu69.html Remark: Note that there is no support for QWord arguments in array of const. This is for Delphi compatibility, and the compiler will ignore any resulting range checks when in mode Delphi.

but the code shows that QWord is supported. huh?
   TVarRec = record
      case VType : Ptrint of
        ...
        vtInt64      : (VInt64: PInt64);
        vtQWord      : (VQWord: PQWord);
    end;

Also I cannot find Double/Single support in TVarRec but maybe Extended is enough.

Regards, Alexey

Reply by email

Sven Barth
to Alexey Tor.

Alexey Tor. via fpc-pascal schrieb am
So., 9. Feb. 2020, 17:45:

Show quoted text 13 lines
https://www.freepascal.org/docs-html/ref/refsu69.html Remark: Note that there is no support for QWord arguments in array of const. This is for Delphi compatibility, and the compiler will ignore any resulting range checks when in mode Delphi. but the code shows that QWord is supported. huh? TVarRec = record case VType : Ptrint of ... vtInt64 : (VInt64: PInt64); vtQWord : (VQWord: PQWord); end;

It's LongWord that is not supported. This is already fixed in the trunk version of the documentation (and thus what will be used for 3.2).

Also I cannot find Double/Single support in TVarRec but maybe Extended is enough.

Yes, the highest precision floating point type is enough.

Regards,
Sven

Reply by email