Aditional operator functionality

This forum is for any questions about the language Tutorial D or the Rel implementation of it.
Post Reply
steved
Posts: 49
Joined: Sun Sep 01, 2013 10:53 pm

Aditional operator functionality

Post by steved »

Some time ago you mentioned that CAST_AS_CHARACTER(OPERATOR) and CAST_AS_OPERATOR(CHARACTER)
exist internally and were going to be exposed to users in a future update. These operators would be a most
welcomed addition to Rel.

As always, thanks for Rel
Dave
Site Admin
Posts: 372
Joined: Sun Nov 27, 2005 7:19 pm

Re: Aditional operator functionality

Post by Dave »

You could define something similar to CAST_AS_CHARACTER(OPERATOR) by retrieving the operator's source code (I assume it's the source code that would be returned by CAST_AS_CHARACTER?) from the sys.Operators relvar.

You can perhaps achieve something akin to CAST_AS_OPERATOR(CHARACTER) by using EXECUTE. E.g:

Code: Select all

EXECUTE "OPERATOR myOpZZZ() RETURNS INT; RETURN 3; END OPERATOR;";
steved
Posts: 49
Joined: Sun Sep 01, 2013 10:53 pm

Re: Aditional operator functionality

Post by steved »

Sorry for the long delay in responding.
I should have been clear, I was referring specifically to anonymous operators.
Post Reply