Modules are great

BlitzMax Forums/BlitzMax Programming/Modules are great

JoshK(Posted 2006) [#1]
I've compiled all my helper functions into BlitzMax modules, and I'm surprised how reliable BlitzMax is. I expected there to be numerous issues and bugs, but everything compiled and runs flawlessly.

I have a few questions:
If a global variable is declared in a module, is it accessible in the main program? How about in other modules that import this module?

If a module has a function set for OnEnd, will that conflict with whatever OnEnd function the user sets?


Regular K(Posted 2006) [#2]
OnEnd adds it to a list, so it doesn't affect other OnEnd calls.

If you dont want something accessible outside of the source (like a whole type, or some constants, or a global variable) put "Private" before it, but don't forget to call "Public" before the stuff you want accessible outside.


Dreamora(Posted 2006) [#3]
A global defined within a module will be accessable within the main programm. But it won't be accessable within any of the other modules you import to the main program, unless they import this specific module as well.


JoshK(Posted 2006) [#4]
How do I go about setting the modules up on my own server, so that updates will work with SyncMods?


tonyg(Posted 2006) [#5]
d-bug has done it here . There's a readme.txt in the download which gives user instructions. Not sure about the other side though.


Yan(Posted 2006) [#6]
Long before BMax was released, there was talk of making it possible for people to run their own mod servers. I don't think it's been mentioned since though.

Perhaps you should try contacting BRL for more info?

[edit]
...Must hit refresh...Goddamnit!... ;o)
[/edit]