[fpc-pascal] $definec and $define

Adriaan van Os adriaan at adriaan.biz
Fri Jan 12 17:02:06 CET 2024


The FreePascal Programmer's Guide version 3.2.0 reads in section 1.2.11

"Under Mac Pascal mode, the $DEFINEC directive is equivalent to the $DEFINE directive and is
provided for Mac Pascal compatibility.

{$DEFINE} can also be used to define macros or compile-time constants:"

This is not correct. In Metrowerks Pascal, $definec and $define are two distinct directives

$definec key value		defines a macro where key is replaced by value
$definec key		 	defines a macro where key is replaced by an empty string
$define key			defines key as a symbol (to test with $fdef c.s.)

This is also how it actually works in FPC in Macpas mode, where $definec key and $define key are 
not equivalent.

Regards,

Adriaan van Os



More information about the fpc-pascal mailing list