MACPAS mode
This mode is selected by the $MODE MACPAS switch. On the command line, this mode is selected by the -Mmacpas switch. It mainly switches on some extra features:
Support for the
$SETCdirective.Support for the
$IFC,$ELSECand$ENDCdirectives.Support for the
UNDEFINEDconstruct in macros.Support for
TRUEandFALSEas values in macro expressions.Macros may be assigned hexadecimal numbers, like
$2345.The
Implementationkeyword can be omitted if the implementation section is empty.The
cdeclmodifier keyword can be abbreviated toC.UNIVModifier for types in parameter lists is supported....(ellipsis) is allowed in procedure declarations, is functionally equal to thevarargskeyword.$MODESWITCH nestedprocvarsis enabled by default.
(Note: Macros are called ’Compiler Variables’ in macOSdialects.)
Currently, the following macOSpascal extensions are not yet supported in MACPAS mode:
External procedures declared in the interface must have the directive
External, unless the unit has noImplementationsection.Cycleinstead ofContinue.Leaveinstead ofBreakExitcannot have the name of the procedure to exit as parameter. Instead, for a function the value to return can be supplied as parameter.No propagating
uses.Compiler directives defined in interface sections are not exported.
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
