User defined operators

This forum is to report technical problems with Rel.
Post Reply
Chris Walton
Posts:76
Joined:Sat Aug 18, 2012 2:13 pm
User defined operators

Post by Chris Walton » Tue Dec 03, 2013 1:11 am

The following sequence works correctly:

Code: Select all

OPERATOR U0 ( a1 CHAR ) RETURNS CHAR;
RETURN "Test";
END OPERATOR;
U0("T2")
whereas:

Code: Select all

OPERATOR U0 ( a1 CHAR );
END OPERATOR;
U0("T2")
gives the following error:

Code: Select all

ERROR: Could not find operator U0(CHARACTER)

Dave
Site Admin
Posts:368
Joined:Sun Nov 27, 2005 7:19 pm

Re: User defined operators

Post by Dave » Wed Dec 04, 2013 1:22 pm

U0 does not return a value, so it can't be invoked in an expression. DBrowser assumes that any code which doesn't end with a semicolon must be an expression. Try this:

Code: Select all

CALL U0('T2');

Post Reply