Page 1 of 1

Operator overload

PostPosted: Mon May 03, 2010 7:53 am
by Gameday
Hi guys!

I'm sorry if my searching skills suck, but I tried searching for Operator overloading and all I could find on the forums was an example of using compareTo. Is there a page that specifies which operators can be overloaded?

Re: Operator overload

PostPosted: Mon May 03, 2010 9:10 am
by Charles
Not yet. This topic just came up. See viewtopic.php?f=4&t=598#p3044

Here are the tickets:
-- http://cobra-language.com/trac/cobra/ticket/70
-- http://cobra-language.com/trac/cobra/ticket/69

I forgot to mention that if you implement .compareTo, then Cobra will, in fact, use it for the comparison operators. Same with .equals and == and <>.

But for the mathematical operators, we don't have those yet.