While I am at it, what is the meaning in TD of a public relvar declaration that is local to an operator definition? Does it mean that the relvar is created at the point of declaration (like global public relvars) and dropped at the end of the definition? In that case, what if the operator definition is recursive?
The Date & Darwen books do not say, as I recall. Though I imagine they'd expect it to do something sensible, as usual.
In Rel, I disallowed it. It does this:
OPERATOR MyOp();
VAR MyRelvar999 REAL RELATION {x INT} KEY {x};
END OPERATOR;
CALL MyOp();
ERROR: RS0018: REAL relation-valued variables may not be defined inside a user-defined operator.
While I am at it, what is the meaning in TD of a public relvar declaration that is local to an operator definition? Does it mean that the relvar is created at the point of declaration (like global public relvars) and dropped at the end of the definition? In that case, what if the operator definition is recursive?
The Date & Darwen books do not say, as I recall. Though I imagine they'd expect it to do something sensible, as usual.
In Rel, I disallowed it. It does this:
OPERATOR MyOp();
VAR MyRelvar999 REAL RELATION {x INT} KEY {x};
END OPERATOR;
CALL MyOp();
ERROR: RS0018: REAL relation-valued variables may not be defined inside a user-defined operator.
I'm the forum administrator and lead developer of Rel. Email me at dave@armchair.mb.ca with the Subject 'TTM Forum'. Download Rel from https://reldb.org