Quick noob question on BMx Types & Lists

BlitzMax Forums/BlitzMax Beginners Area/Quick noob question on BMx Types & Lists

Forgive me if this is a real dumb question, but I'm having trouble with BlitzMax types and lists (after coming from B3d).

Are they in any way similar to the way DarkBasic handles types and an array to keep track?

My apologies if this is a stupid question, but I'm really trying to get into BlitzMax, but I'm finding it quite tough.

Many thanks for your time / patience.


Tobo

I'm not sure how DarkBasic works, but maybe this will help?

Types are not tracked by a list, but you can track them with a list (like older blitz)
(NOTE: Get and Set methods for value are not necessary, it is just a way of going 'true oop')
SuperStrict

Framework brl.standardio
Import brl.linkedlist

Type TMyType
  
  'Our tracking list
  Global _list:TList = New(TList)
	
	Field value:String
	
		Method New()
			
			'Every time we create a MyType object we want to add it to the list
			_list.AddLast(Self)
			
		End Method
		
		Method SetValue(_value:String)
			
			value = _value
			
		End Method
		
		Method GetValue:String()
			
			Return value
			
		End Method
		
		Function Create:TMyType(_value:String)
		  Local obj:TMyType
			
			obj = New(TMyType)
			
			obj.SetValue(_value)
			
		   Return obj
		   
		End Function
		
End Type


'Lets create some objects!

TMyType.Create("Hello")
TMyType.Create("World!")
TMyType.Create("Blitz Rocks!")

'Iterate all the objects tracked by the type
For Local obj:TMyType = EachIn TMyType._list
	
	Print obj.GetValue()
	
Next

End