infratec wrote: Fri Nov 15, 2024 7:47 am
You have to use an empty Enumeration in every Declare part of a module.
The empty Enumeration seems only required in the common module declaration, to initialize the Enumeration name (Common::Name).
And in other modules declaration, "UseModule Common" seems to be enough.
Actually, I did as you do, with a variable which is set from the main program.
As I use constants and not PB_Any, I'll probably use it now that I'm re-reviewing it.
Code: Select all
DeclareModule Common
Enumeration Name
EndEnumeration
EndDeclareModule
Module Common
Enumeration Name
#Test1
#NameCommon
EndEnumeration
Debug "Module Common: " + #NameCommon
EndModule
DeclareModule MyModule
UseModule Common
EndDeclareModule
Module MyModule
Enumeration Name
#NameMyModule
EndEnumeration
Debug "Module MyModule: " + #NameMyModule
EndModule
UseModule Common
Enumeration Name
#Test2
#NameMain
EndEnumeration
Debug "Main: " + #NameMain