$extendedSyntax

From Lazarus wiki
Revision as of 14:21, 19 February 2021 by Kai Burghardt (talk | contribs) (create)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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

  • Functions can be called as if they were procedures. The function result is discarded. This is potentially harmful if, for example, the function allocated new memory space and returned a pointer to it.
  • Integer arithmetic operations are allowed on pointers. The directive {$pointerMath} had to be on for that during the respective pointer type’s definition.
  • Pointers become ordered and can be compared using <,>, <= and >=. Typed pointers have to correspond to each other.

comparative remarks

see also