type vs array

Blitz3D Forums/Blitz3D Beginners Area/type vs array

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.

This is what I do.
Type mytype
  Field var1%
  Field var2#
End Type

Local mt1.mytype = New mytype
Local mt2.mytype = New mytype

For a.mytype = Each mytype
  For b.mytype = Each mytype
    If Handle(a)>Handle(b) then
      ; do your stuff
    Endif
  Next
Next

You can also do If a<>b , but that will result two tests: mt1 against mt2 and mt2 against mt1. The function Handle() returns the pointer of the type object. I think this is what you wanted?