Sign in Join
Wiki copytemporary

Revision 3 of 3, by Bart on 10-23-2022. The page as it is now.

$extendedSyntax

The global compiler directive {$extendedSyntax on} turns on additional syntax. The FPC has this by default on. The short notation is {$X+}/{$X‑}.

Affected syntax

Notes

{$extendedSyntax off} var

   p: pChar;

begin

   p := nil;
   inc(p, 42); { no problem }

end.

Similarly, unusual comparison operations may be accessible with foreign routines.

{$extendedSyntax on} begin

   pi; { discardFunctionResultDemo.pas(4,4) Error: Illegal expression }

end.

even though a custom pi function doing exactly the same would be acceptable.

Comparative remarks

See also


From the Free Pascal wiki, page "$extendedSyntax", as it stood on 2022-10-23 after a change by Bart, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.