How would I add new Bmax commands?

BlitzMax Forums/BlitzMax Beginners Area/How would I add new Bmax commands?

MGE(Posted 2008) [#1]
Let's say I wanted to add new commands to Blitzmax, how would I do that? I'm just curious.


Brucey(Posted 2008) [#2]
Make a module.

Import it.

Call it :-)


MGE(Posted 2008) [#3]
Yepper, been there done that. I was just curious if it's possible to expand the internal built in command set and if so...how? ;)


tonyg(Posted 2008) [#4]
... by making a module, importing it and calling it.


TaskMaster(Posted 2008) [#5]
All of the standard brl commands are just modules exactly like the ones we can create. Maybe you want to put your mod in the brl namespace? if so, just put your mod in the brl.mod directory.


MGE(Posted 2008) [#6]
Interesting. Thanks. :)


Brucey(Posted 2008) [#7]
Maybe you want to put your mod in the brl namespace?

Not a great idea... if you are going to add a module, you may as well give it your own namespace.

When you update your BlitzMax (whenever an update is available), *all* the Pub and BRL modules are removed and replaced with the updated versions. You (or your users) would then have to either re-install your module again, or go hunting for the original and copy it back into the new folder.
Using your own namespace you can completely avoid this.


TaskMaster(Posted 2008) [#8]
I realize this, but he seemed to be pretty set on it. :)


MGE(Posted 2008) [#9]
I was just curious how the language itself was updated with new commands. Thanks. ;)