I find it disconcerting that the preprocessor accepts {$define 0}
I expected that whatever follows the $define would be required to follow Pascal's valid identifier rules.
That's not the only unexpected value it allows. It allows just about any character, e.g, +
For instance, the preprocessor "sort of" accepts
{$define +}
{$ifdef +}
{$FATAL + is defined}
{$endif}
The define is accepted, OTH, the ifdef is rejected (unlike with a numeral.)
The "variability" in what the preprocessor considers a valid identifier can make for some ambiguous and confusing situations.
All that said, this thread's topic wasn't what the preprocessor considers a valid/possible name but, maybe that should be given some thought because it is currently a rather nebulous area, i.e, nowhere in the documentation does it say what is and isn't a valid preprocessor name/identifier.
Conclusion 1, a $define should probably apply the same rules the $ifdef applies (it currently doesn't.)
Conclusion 2, a valid preprocessor name/identifier should probably be limited to valid Pascal identifiers.