How to use DATA command in Blitz Max?

BlitzMax Forums/BlitzMax Beginners Area/How to use DATA command in Blitz Max?

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'm moving from Blitz Basic to Blitz Max and would like to upgrade my DATA commands, but I don't know how to do it.

On the Blitz Wiki it shows "DefData" and "ReadData" but there aren't any examples.

Ideally, I'd like it to be oo-orientated in this example;

Global player_list:TList=CreateList() 'To Store all the players

Type player
	Field name$

	Function create(_name$)
		p:player 	= New player
		p.name$		= _name$
		ListAddLast player_list, p
	End Function	
End Type

' Example data, this won't work in Blitz Max;
.lbl_names
Data "Smith"
Data "John"
Data "Bob"
Data "end" ' This is a marker saying its reached the end of all the names