Member variables in a Type

BlitzMax Forums/BlitzMax Beginners Area/Member variables in a Type

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.

I don't follow. When you refernce an attribute in an instance of the type, it is only for that instance. It is not global. Please clarify

Type sandwich
	Field meat:String
	Field Cheese:String
End Type 

BLT:sandwich = New sandwich
BLT.meat = "Bacon"
BLT.Cheese = "Cheddar"

Turkey:Sandwich = New sandwich
Turkey.meat = "Turkey"
Turkey.Cheese = "Swiss"

Print BLT.meat
Print Turkey.meat