Peter
Edit:
Ich vermute es wird immer auf ein CompilerIf/EndIf-Paar geprüft. Also innerhalb eines Makros, Prozedur oder Modul.
Code: Alles auswählen
EnableExplicit
;#fDebug = 1 ; Ohne Fehler, mit Debugausgabe.
#fDebug = 0 ; [COMPILER] Line 23: 'CompilerIf' without 'CompilerEndIf'.
Macro DebugIf
CompilerIf #fDebug
EndMacro
Macro DebugEndIf
CompilerEndIf
EndMacro
Macro DebugIfEndIf
CompilerIf #fDebug
Debug "If und EndIf gemeinsam."
CompilerEndIf
EndMacro
Procedure Test()
DebugIf
Debug "If und EndIf getrennt."
DebugEndIf
DebugIfEndIf
EndProcedure
Test()