viewtopic.php?p=524830#p524830#NULL wrote: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
I was going to propose this as a feature request but I think a new keyword block would make the most sense:
Code: Select all
Scope
EndScope
- Variable names can be re-declared as different types later.
- Nameless scopes can be created and used anywhere and in places that modules cannot (such as in procedures).
- Scopes would inherit their parent scope (which modules do not).