Hi UnifAce
I want to include a call to an ENTRY every time an OPERATION is called, just for debug purpose.
OPERATION XYZ
params
string v_PARA:INOUT
endparams
call SP_OPR_GO_IN("XYZ",v_PARA)
And
SP_OPR_GO_IN
params
string v_PARA:IN
endparams
IF(!$$DBG) RETURN(0) ; Not in debug, do nothing
...
If v_PARA is filled by lot of data, this could be time consuming.
So
OPERATION XYZ
params
string v_PARA:INOUT
endparams
IF($$DBG) call SP_OPR_GO_IN("XYZ",v_PARA)
should be a better solution.
Now I have to check for $$DBG in every place a call the global proc.
Not the problem, if the condition is this easy.
But what if, the condition is not this easy but a little bit tricky?
Is there any way to pass a parameter by reference (pointer) even if it is "only" a string?
[EDIT: a reference to a const expression]
In every moderen language this is possible (may be behind the curtain)
And UnifAce is a modern language, or ... 🙂
Ingo