As we all know, xBase is workarea-centric in regards of the command-scope. Any record related command is based on the position in the current workarea. Therefor if you are at EOF() in the current workarea, this command will do nothing:
REPLACE otherArea.SomeField with Something
You would need to write a bunch of lines like that:
cOldAlias = ALIAS()
SELECT OtherAlias
REPLACE SomeField WITH Something
SELECT (cOldAlias)
In VFP we have the IN clause to temporarily shift the controlling workarea, thus the above 4 lines are now
REPLACE SomeField WITH SomeThing IN OtherAlias
The IN clause temporarily shifts the workarea for that command only.
Would be great if we could get that on all workarea related commands (REPLACE, BLANK, APPE, COUNT, CALC, BROWS, SCAN, LOCATE, CONT, SET RELA, SET FILT etc)
Interestingly, the USE already has the IN clause.
Thanks for considering!
Bookmarks