Confused about instance variables

BlitzMax Forums/BlitzMax Beginners Area/Confused about instance variables

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.

BlitzMax looks like lots of fun, but I'm getting confused about how instance variables work in BlitzMax. This snippet of code isn't doing what I expect:

---
Type Foo
Field bar:String;

Function Report()
Print(bar)
EndFunction

EndType

Local a:Foo=New Foo
a.bar="Hello World"
a.Report();
---

I would expect to see "Hello World" printed, but instead I see "0". What gives?