[Implemented] CompilerIf constants ...

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 constants ...

Post by helpy »

Hello dev team,

Would be nice to have a new CompilerIf Constant, so I can check if a program is compiled as console program:

Example:

Code: Select all

Macro ABORT( msg, ExitCode=0 )
	CompilerIf #PB_Compiler_Console = #True
		PrintN( "PROGRAM ABORTED" + #CRLF$ + msg j)
	CompilerElse
		MessageRequester("PROGRAM ABORTED", msg, #MB_ICONSTOP)
	CompilerEndIf
	End ExitCode
EndMacro
cu, helpy