[Implemented] CompilerIf ... if constant not defined ...

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
helpy
Enthusiast
Enthusiast
Posts: 552
Joined: Sat Jun 28, 2003 12:01 am

[Implemented] CompilerIf ... if constant not defined ...

Post by helpy »

If a constant is not defined, it would be nice, if the compiler directives interpret them as false:

Code: Select all

CompilerIf #Constant
   ;... #Constant is defined and is not null
CompilerElse
   ;... if #Constant is not defined or if it is null
CompilerEndIf
cu, helpy

(Implemented as 'Defined()')
horst
Enthusiast
Enthusiast
Posts: 197
Joined: Wed May 28, 2003 6:57 am
Location: Munich
Contact:

Re: CompilerIf ... if constant not defined ...

Post by horst »

I strongly support this request.
It is very useful for included files with a number
of small procedures and declarations, so I don't
have to specify everything I <b>don't</b> want in
the main file.
Horst.
GPI
PureBasic Expert
PureBasic Expert
Posts: 1396
Joined: Fri Apr 25, 2003 6:41 pm

Post by GPI »

Better would be

Code: Select all

CompilerIfDef
Post Reply