Comparing user types

BlitzMax Forums/BlitzMax Beginners Area/Comparing user types

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.

myType = myType2 won't check if the the types contains the same value, it will just check if they point to the same MyType object.

Local myType:MyType = MyType.Create(30, 30)
Local myType2:MyType = MyType.Create(35, 35)
If myType = myType2
' This code won't execute since myType and MyType2 points to two different objects
Endif

Local myType:MyType = MyType.Create(30, 30)
Local myType2:MyType = myType
If myType = myType2
' This code will execute since myType and myType2 points to the same object
Endif