Hi John,
Be aware that a pp rule cannot start with a match marker (in Harbour it
_can_, not in Clipper), that's a starter
Some operators pose a problem since < and > are also (match/result) marker delimiters to the pp, but that's easy to circumvent by inserting a \ before
the > or <, although in your case the -> operator is seen as one token by
the pp, so here no \ is needed (yet in the <= and >= operators, because < or
is upfront)
#xtranslate -> fieldname1 => -> fieldname2
is supported; but it's a half measure; also whatever -> fieldname1 will trigger; moreover, what if your code also contains dbname1 -> ( FIELDPOS( "fieldname1" ))?
iow, i don't think it's a good idea; a batch search and replace with manual confirmation from within an editor is much safer
hth,
Frank
"John Ward" <
[email protected]> schreef in bericht news:
[email protected]...
I need to perform a large update to Clipper code and thought it would be >easier to use #translate or #xtranslate.
I have a field I need to change the name on.
I need to change:
dbname1->fieldname1
to:
dbname1->fieldname2
I figure out how to do the simple version and just reference the field
name, but I am concerned about the impact.
#xtranslate fieldname1 => fieldname2
Does anyone know the sytnax to include the ">" as part of the translate matchPattern?
This syntax does not work:
#xtranslate '>ownconstate' => '>ownconstat'
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)