Results 1 to 5 of 5

Thread: IN directive for workarea based commands

Threaded View

  1. #1
    Join Date
    Feb 2012

    IN directive for workarea based commands

    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!
    Last edited by woody-soft; 2021-01-02 at 11:29.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Journey into the Cloud
Join us