PureBasic Forum
https://www.purebasic.fr/english/

PureBasic Modules: A Quick Tutorial
https://www.purebasic.fr/english/viewtopic.php?f=12&t=70686
Page 2 of 2

Author:  DontTalkToMe [ Sat Jun 02, 2018 4:07 pm ]
Post subject:  Re: PureBasic Modules: A Quick Tutorial

Code:
DeclareModule myModule
EndDeclareModule

Module myModule
  Define myVar = 123
EndModule

Debug myModule::myVar   ; == 0 ?



Quote:
However, you'd notice that the resulting output is still zero. Why is this?


The output can't be be zero since the code is not valid.
myVar is local to the module and it's not accessible from the external debug statement.

Less important, but I would add a .f to
Code:
Global myVersionNumber = 1.23

since it's a float in the example after that which is a variation of this one.

Author:  minimy [ Sun Aug 26, 2018 12:23 pm ]
Post subject:  Re: PureBasic Modules: A Quick Tutorial

Wauuuu master TI, thanks for this very comprensive tutorial!!!
As allways PBforum is the best!!
Great community with a lot of gray matter!!

I now can put, halt and catch fire like a module in my HAL9000 :mrgreen: :mrgreen: HAHAHA

THANKS AGAIN TI!!! +1

Page 2 of 2 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/