Can anyone explain this?

BlitzMax Forums/BlitzMax Programming/Can anyone explain this?

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.

isn't it apparent that by the nature of it being global... it *IS* scoped out of the TYPE, as well as being scoped out of the instance variable... so it really doesn't matter where you declare it, inside the type or outside the type...


Sorry Red but this is wrong, if you declare a global inside a type, it only has scope inside that type, its global to any instance of that type.

also if you declare a global in a function, its scoped inside that function, you cant "see" it in your main program. the advantage to this is that it doesnt change between function calls.