Complete newbee question about modules

BlitzMax Forums/BlitzMax Beginners Area/Complete newbee question about modules

Ant(Posted 2006) [#1]
Hi, I wondered if someone can enlighten me with regard to modules. I understand that BMax is constructed from modules, and I understand that you can create your own. What exactly is the purpose of creating your own modules aside from being able to share them with others? If I have a specific set of functions relating to an area of code (ie sound ) is there an advantage to me building a sound module as opposed to just including/importing a sound.bmx? Are modules essentially bmx version of DLL's?
Thanks


ImaginaryHuman(Posted 2006) [#2]
You can just include a sound.bmx to do the same thing. But I'm not sure, maybe modules give you the ability to make your new commands show up hilighted as real commands? Plus documentation being included?


Ant(Posted 2006) [#3]
ok thanks. Can anyone else help me out or point me in the right direction?
Thanks


Dreamora(Posted 2006) [#4]
Points:

- Automatic documentation creation if the BBDOC is followed
- Inclusion using a single line from anywhere, no need to copy it over again and again
- You can share modules, WITHOUT sharing its sources! (its enough if you give the .a and .i, no need for the .bmx) Great if you do not want to share your sources


Ant(Posted 2006) [#5]
I understand, so BMax modules as essentially just DLL's? I'll search the forums for ways on how to create modules.

THanks!


Dreamora(Posted 2006) [#6]
Not dlls but .a which is the GCCs equivalent to .lib ie static libraries (while dlls are dynamic libraries).

while dll remain as their own file next to the exe or in system32, .a / .lib are linked into the exe and become a part of it.


Ant(Posted 2006) [#7]
Great - thanks for taking the time to explain that.
Cheers


ImaginaryHuman(Posted 2006) [#8]
Yah a dynamic linked library is not the same thing as including a piece of sourcecode.