Module bad understanding
Posted: Sun Apr 16, 2023 6:01 am
I don't know if it is a misunderstanding from me or a bug.
Maybe the modules are not as clear to me.
Not a big problem.
The first code show a compiler error :
Debug Essai::String_1$ generate an error but CompilerIf Essai::#Mode_Debug = #True not, inside procedure Start(). But all #Mode_Debug & Global String_1$, Global String_2$, Global String_3$ are declared inside DeclareModule.
If i change Debug Essai::String_1$ for Debug String_1$ (String_2$ et String_3$), it's Ok.
Maybe the modules are not as clear to me.
Not a big problem.
The first code show a compiler error :
Debug Essai::String_1$ generate an error but CompilerIf Essai::#Mode_Debug = #True not, inside procedure Start(). But all #Mode_Debug & Global String_1$, Global String_2$, Global String_3$ are declared inside DeclareModule.
If i change Debug Essai::String_1$ for Debug String_1$ (String_2$ et String_3$), it's Ok.
Code: Select all
EnableExplicit
DeclareModule Essai
#Mode_Debug = #False
CompilerIf #Mode_Debug = #True
Global String_1$ = "Première chaine"
Global String_2$ = "Seconde chaine"
Global String_3$ = "Troisième chaine"
CompilerEndIf
Declare.i Start()
EndDeclareModule
Module Essai
Procedure.i Start()
CompilerIf Essai::#Mode_Debug = #True
Debug Essai::String_1$
Debug Essai::String_2$
Debug Essai::String_3$
CompilerEndIf
EndProcedure
EndModule
Essai::Start()