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 »

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 »

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