Code: Select all
DeclareModule SomeModule
Enumeration
#A
#B
#C
EndEnumeration
EndDeclareModule
Code: Select all
[COMPILER] Module 'SomeModule' has been only declared (Module/EndModule part missing).
Code: Select all
DeclareModule SomeModule
Enumeration
#A
#B
#C
EndEnumeration
EndDeclareModule
Code: Select all
[COMPILER] Module 'SomeModule' has been only declared (Module/EndModule part missing).
Code: Select all
DeclareModule CommonConstants
; Form
Enumeration FormWindow
EndEnumeration
Enumeration FormGadget
EndEnumeration
Enumeration FormMenu
EndEnumeration
Enumeration FormImage
EndEnumeration
Enumeration FormFont
EndEnumeration
; Event
Enumeration EventCustom #PB_Event_FirstCustomValue
EndEnumeration
Enumeration EventTypeCustom #PB_EventType_FirstCustomValue
EndEnumeration
EndDeclareModule
Module CommonConstants
EndModule
Good question I think you could wrap any code in a module for encapsulation and the module will execute itself wherever it's included, even though nothing could be called from outside.Mistrel wrote:Is there a use case for a Module/EndModule without a DeclareModule/EndDeclareModule?
Code: Select all
DeclareModule msg
EndDeclareModule
Module msg
m.s = "hello"
MessageRequester("msg", m)
EndModule
Me too. I experimented with Modules, then OOP(ish) Interfaces and ended up back at Namespace_Command().luis wrote:In the meantime I finally gave up on modules though.
This is actually a very good use case as it would be equivalent to creating temporary scope. It would be even more useful if we didn't have to provide a name for this purpose.#NULL wrote:I think you could wrap any code in a module for encapsulation and the module will execute itself wherever it's included, even though nothing could be called from outside.
luis wrote:In the meantime I finally gave up on modules though.
I've ignored modules since their introduction since I was already using Namespace_Command() as well. So it's all new and fun for me.the.weavster wrote:Me too. I experimented with Modules, then OOP(ish) Interfaces and ended up back at Namespace_Command().