Public / Private methods or functions?

BlitzMax Forums/BlitzMax Beginners Area/Public / Private methods or functions?

Smurftra(Posted 2006) [#1]
Is there a way to make public or private methods or functions in types?

To explain further

I'm making a type to use across different project. There are some functions/methods included in the type that are not to be called from outside the type, so i'm looking for a way t make them Private to the type, and eventually hope an IDE like Blide (which is sweet) wouldnt show these functions/methods when someone's using the type


tonyg(Posted 2006) [#2]
Look in the help for Public and Private


N(Posted 2006) [#3]
No.


Mark Tiffany(Posted 2006) [#4]
...but there really should be.


N(Posted 2006) [#5]
Should be, but there aren't, despite the past requests.


Dreamora(Posted 2006) [#6]
At the moment, public - private are "pointless" ... they don't do anything to the compiled module ... the only thing private does is prevent that an entry for this method / function / field / local / global is added to the Interface (.i) file. So if you need a private method, feel free to do it by simply removing the entries from the .i files ...


Grey Alien(Posted 2006) [#7]
I'd like this too. All I've heard suggested is stick _ on the start of the private fields and function names so they look differnt :-(


N(Posted 2006) [#8]
At the moment, public - private are "pointless" ... they don't do anything to the compiled module ... the only thing private does is prevent that an entry for this method / function / field / local / global is added to the Interface (.i) file. So if you need a private method, feel free to do it by simply removing the entries from the .i files ...


Interface files aren't generated for code that isn't in a module.


Dreamora(Posted 2006) [#9]
You are right, private removes it from module usable part completely.

But still: removing its entry from .i will take care that others can't use it unless the know the exact naming etc to reconstruct the line ...