Private Fields, or Variables In a Type
BlitzMax Forums/BlitzMax Programming/Private Fields, or Variables In a Type
| ||
| Ok, maybe I missed it somewhere. (Sorry guys, but the documentation isn't very helpful). Is it possible to have a variable inside of a type that can't be seen outside of the type? For example - I'd like to do something like this:
Type MyType
Private Field Counter:Int = 0
.....
End Type
I tried using a 'Local' variable declaration inside of the Type but BMAX didn't like that either. -Jim |
| ||
| No sorry. Access modifiers currently don't work that way (they only work on entire classes). You can't have private constructors either. [Edit]There was some mention of plans to change this, but no mention of a timeframe. |
| ||
| Wow! That IS disappointing. Seems to me having private class members is one of the essentials of OOP development. |
| ||
| I think we can all agree with that. I wonder what reason there was not to include this in bmax ... |