Defined keyword



Defined keyword
Pas2JS pascal source code
if ConditionalDefined('ALPHA') then WriteLn('ALPHA 1'); if ConditionalDefined('BETA') then WriteLn('BETA 1'); {$IF Defined('ALPHA')} WriteLn('Alpha defined'); {$ELSE} WriteLn('Alpha not defined'); {$ENDIF} {$DEFINE ALPHA} {$IF Defined('ALPHA')} WriteLn('Alpha defined'); {$ELSE} WriteLn('Alpha not defined'); {$ENDIF} if ConditionalDefined('ALPHA') then WriteLn('ALPHA 2'); if ConditionalDefined('BETA') then WriteLn('BETA 2'); {$DEFINE BETA} if ConditionalDefined('ALPHA') then WriteLn('ALPHA 3'); if ConditionalDefined('BETA') then WriteLn('BETA 3'); {$UNDEF ALPHA} if ConditionalDefined('ALPHA') then WriteLn('ALPHA 4'); if ConditionalDefined('BETA') then WriteLn('BETA 4'); {$IF Defined('ALPHA')} WriteLn('Alpha defined'); {$ELSE} WriteLn('Alpha not defined'); {$ENDIF} { <<<<<<<<<<<< CONSOLE OUTPUTS >>>>>>>>>>>>>>>>>>> Alpha not defined Alpha defined Alpha not defined }