Hi all! Quick question, is possible to compare user types like so...
Local myType:MyType = MyType.Create(30, 30)
Local myType2:MyType = MyType.Create(35, 35)
if myType = myType2 then
'do some code
end if
? I'm sure its possible. I'd rather do it this way than to compare all of the fields by themselves. I've heard mention of overriding the Compare method, but only in sorting type applications. If overriding the Compare method is the way to go, could someone type me up a quick demonstration?
BTW, BlitzMax owns.
Edit: I'd also like to know if its possible to copy a user type without creating your own Copy method. :-D
Local myType:MyType = MyType.Create(30, 30)
Local myType2:MyType = MyType.Create(35, 35)
if myType = myType2 then
'do some code
end if
? I'm sure its possible. I'd rather do it this way than to compare all of the fields by themselves. I've heard mention of overriding the Compare method, but only in sorting type applications. If overriding the Compare method is the way to go, could someone type me up a quick demonstration?
BTW, BlitzMax owns.
Edit: I'd also like to know if its possible to copy a user type without creating your own Copy method. :-D