$IF declared() doesn't work as expected (or is unimplemented?)
Original Reporter info from Mantis: FPCCore
-
Reporter name: FPC core team
Original Reporter info from Mantis: FPCCore
- Reporter name: FPC core team
Description:
I was trying to add conditional compilation depending on a symbol being defined or not, and thought of using the
{$IF DECLARED(x)} syntax, which is neither rejected by FPC nor does it work.
The attached program under delphi (with the obvious fix of endif -> ifend) prints
a declared, a = 1
b not declared
It would be very nice to have theses two things in FPC as well.
Additional information:
Reporter: Johannes Berg
EMail: bugs at johannes dot sipsolutions dot de
Mantis conversion info:
- Mantis ID: 4797
- OS: Linux
- Version: 1.9.1
- Fixed in version: 1.9.1