[Gambas-user] _compare() Type mismatch: wanted Date, Number or String

Patrik Karlsson pata.karlsson at ...626...
Tue Jul 31 15:42:43 CEST 2012


I'm writing a class for Playing cards and would like to compare them with:
=,<,>.

While hPlayingCard1=hPlayingCard2 works just fine,
hPlayingCard1<hPlayingCard2 and hPlayingCard1>hPlayingCard2 do not.

The program stops with:
#6: Type mismatch: wanted Number, Date or String, got PlayingCard instead

My _compare is simple:
Public Function _compare(OtherObject As PlayingCard) As Integer

    Return 0

End

What can I do to make comparing with <,> possible?

/patrik



More information about the User mailing list