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.

This is getting too complicated.

Pappavis, I think the trouble stems from that you are confusing methods with functions

Type person
 Field name:String

 Method setname(newname:String)
  name = newname
 End Method

 Method getname:String()
  Return name
 End Method
End Type

Local aperson:person = New person
aperson.setname("Bob")
Print aperson.getname()