User Defined Operators

16 views
Skip to first unread message

gnuarm.del...@gmail.com

unread,
Dec 15, 2020, 2:45:33 PM12/15/20
to
Is this possible? I can't find much info on the Internet addressing the possibility. Seems they only talk about overloading existing operators.

I created an example to define a new OR operator for integers as if they were 32 bits. That seemed to work ok. But when I called it "Ralph", the compiler complains, not at the definition, but at the usage. It seems to initial accept that, but when it sees the second operand (or maybe on completion of recognizing the Ralph operator) it barfs say it was expecting a WHEN.

So it is illegal to define new operators?

--

Rick C.

- Get 1,000 miles of free Supercharging
- Tesla referral code - https://ts.la/richard11209
Reply all
Reply to author
Forward
0 new messages