Crouching Functions Hidden Methods
BlitzMax Forums/BlitzMax Programming/Crouching Functions Hidden Methods| 
 | ||
| I'm a little fuzzy on this issue with Blitz. Is there no way to hide Methods / Functions in BlitzMax from outside the type (i.e. Private Methods / Functions)? | 
| 
 | ||
| No. A kind of assumed convention seems to be to stick an underscore in front of private fields, guess you could do the same for private methods e.g. _private_method() | 
| 
 | ||
| Terabit, I think you can do this: | 
| 
 | ||
| Thanks for the info. :) | 
| 
 | ||
| Sorry for the disinfo, Terabit! It's new to me. Has that functionality always been there, Matt? | 
| 
 | ||
| I don't think you did provide disinfo, John. I tried Matt's code ( because I also believed what you believed ) and it throws a "Syntax error in User Defined Type" error, which is exactly what I thought it would do. | 
| 
 | ||
| John is quite correct and I think Matt just misunderstood the question. You can't make individual methods/functions of a type private. You can only make entire types private/public. | 
| 
 | ||
| you could extend a private type in the public scope of the same code file...  I think | 
| 
 | ||
| I think Matt is correct in what he said although it doesn't answer the original query. Import "hello_world_private.bmx" hello() world() with hello_world_private.bmx = Private Function hello() Print "hello" End Function Public Function world() Print "World!" End Function |