Feature request: B3D's Str function

BlitzMax Forums/BlitzMax Programming/Feature request: B3D's Str function

i think Ginormous was indicating writing a new compare function that you can use in conjunction with overridden ToString methods... something like:

Type test1
	Field x:Int=0

	Method ToString:String()
		Return "["+x+"]";
	EndMethod
EndType

Type test2
	Field x:Int=0
	Field y:Int=1

	Method ToString:String()
		Return "["+x+","+y+"]";
	EndMethod
EndType

tester1:test1=New test1
tester2:test2=New test2
tester3:test1=New test1

DebugLog(tester1.ToString())
DebugLog(tester2.ToString())
DebugLog(tester3.ToString())

DebugLog(ObjStrComp(tester1,tester2))
DebugLog(ObjStrComp(tester1,tester3))


Function ObjStrComp:Int(obj1:Object,obj2:Object)
	Return (obj1.ToString()=obj2.ToString())
EndFunction