Good Programming Habits

Blitz3D Forums/Blitz3D Programming/Good Programming Habits

James, I'm a reasonable C coder that can use structures - but for some reason I just cant get my head around blitz'es types !?. (all this '.' and '\' !)

There is a trick to it. Once you realize that (a) '.' isn't the member operator ('\' is), and (b) the type designation always comes AFTER the variable name, it gets a lot easier.

e.g.
int: a%
float: a#
string: a$
custom: a.custom <-- '.' is type declaration

and then the neumonic for remembering \ is that \ is analogous to a directory. WHen you want to get at a field that "in" a certain type, use '\'.

a\field1 <-- this type is already instantiated