by sambomb » Mon Oct 18, 2010 4:39 pm
Hi, I need to change the replace command to add a function when he is executed.
- Code: Select all Expand view
#command REPLACE [ <f1> WITH <x1> [, <fn> WITH <xn>] ] ;
[FOR <for>] ;
[WHILE <while>] ;
[NEXT <next>] ;
[RECORD <rec>] ;
[<rest:REST>] ;
[ALL] ;
;
=> DBEval( ;
{|| _FIELD-><f1> := <x1> [, _FIELD-><fn> := <xn>]}, ;
<{for}>, <{while}>, <next>, <rec>, <.rest.> ;
)
#command REPLACE <f1> WITH <v1> [, <fN> WITH <vN> ] ;
=> _FIELD-><f1> := <v1> [; _FIELD-><fN> := <vN>]
I need to change to something like that:
=> If ( <f1> = "RESGISTRO" .Or. <fn> = "RESGISTRO",;
_FIELD-><f1> := <v1> [; _FIELD-><fN> := <vN>],;
_FIELD-><f1> := <v1> [; _FIELD-><fN> := <vN>];
REGISTRA())