Method and field with same name
BlitzMax Forums/BlitzMax Programming/Method and field with same name Why not just change the position method to SetPosition? Or do what some of the brl modules do which is put a under-score before fields eg( Field _Position:tPosition3 )
.
.
I'd either a) change it to _position:tPosition3 or b) change it to fPosition:tPosition3.
Lacking some class-features like privates, properties and such I now use a naming style in large projects to maintain overview:
Type TTexture
Field Blendmode%
Field rWidth%
Field rHeight%
Field _FileWidth%
Field _FileHeight%
Method _DoSomePrivateStuff()
End Method
End Type
Fields r... are readonly Properties, if I want to change it I have to use a method for it.
Fields and Functions _... are strictly private, I never touch them from outside this type.
"Normal" Variables are to be changed directly (cause they are too simple to write an extra Setxxx-Method for it).
Maybe you want to stick to something like this?
Type TTexture
Field Blendmode%
Field rWidth%
Field rHeight%
Field _FileWidth%
Field _FileHeight%
Method _DoSomePrivateStuff()
End Method
End Type
Fields r... are readonly Properties, if I want to change it I have to use a method for it.
Fields and Functions _... are strictly private, I never touch them from outside this type.
"Normal" Variables are to be changed directly (cause they are too simple to write an extra Setxxx-Method for it).
Maybe you want to stick to something like this?
/* clr */
I think I like entity.setposition x,y,z