EnableExplicit
DeclareModule Test
Declare.b moo()
EndDeclareModule
Module Test
Procedure.b moo()
Debug "The value of a : "+Str(a)
EndProcedure
EndModule
Test::moo()
EnableExplicit
DeclareModule Test
EnableExplicit
Declare.b moo()
EndDeclareModule
Module Test
Procedure.b moo()
Debug "The value of a : "+Str(a)
EndProcedure
EndModule
Test::moo()
No bug!
PureBasic 5.73 LTS | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
I have no spiderbasic, but from the purebasic help:
purebasic.chm wrote:When the statements Define, EnableExplicit, EnableASM are used inside a module, they have no effect outside the respective module, and vice versa.
PureBasic 5.73 LTS | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Without this feature, the Namespace of modules is not to be used really sensibly.
PureBasic 5.73 LTS | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
The idea behind the modules is you can share it and include it in your project asap. If someone wants to write a module without EnableExplicit, he can, and if you include it with EnableExplicit in your code, it will still work.