Global variable vs Field variable

BlitzMax Forums/BlitzMax Beginners Area/Global variable vs Field variable

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Globals are variables that belong to the parent type. No matter how many objects you make from this parent type, there will always only be one of the global shared by all.

Fields are variables that belong to the individual types you create from the parent. Functions cannot access fields.

Functions belong to the parent type and only the ONE function ever exists. Functions can only access globals and cannot access fields because fields belong to the individual types you make, not the parent type.

Methods belong to the types you create from the parent. Methods can access fields and globals.

Hope this made sense?!?!