Private Fields, or Variables In a Type

BlitzMax Forums/BlitzMax Programming/Private Fields, or Variables In a Type

CoderLaureate(Posted 2005) [#1]
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


FlameDuck(Posted 2005) [#2]
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.


CoderLaureate(Posted 2005) [#3]
Wow! That IS disappointing. Seems to me having private class members is one of the essentials of OOP development.


skn3(Posted 2005) [#4]
I think we can all agree with that. I wonder what reason there was not to include this in bmax ...