Events That Trigger a Foundation READ in FoxPro

Last reviewed: April 29, 1996
Article ID: Q93622
The information in this article applies to:
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, and 2.5a
  • Microsoft FoxPro for Windows, versions 2.5 and 2.5a

SUMMARY

Microsoft FoxPro supports a READ command that does not contain any GET clauses. It is termed a "foundation READ." A foundation READ is the controlling READ command that has a VALID clause. The VALID clause controls nested, or child, READ commands. The VALID clause in a foundation READ is triggered by events that would terminate the READ command, such as the following:

  • CLEAR READ. In a READ command with a GET clause, the VALID clause is not called for a CLEAR READ command.
  • A key press or mouse click that does not correspond to a menu selection or is not listed in an ON KEY LABEL command.

MORE INFORMATION

A CLEAR READ invokes the READ VALID clause only on a foundation READ. For example, consider an application that starts a foundation READ as indicated below:

   DO MAIN.MPR
   READ VALID handler()    &&  Wait for the user to take action.

A menu option executes a screen set and invokes a child (nested) READ command. In this session, the application issues a CLEAR READ command. Doing so terminates both READ commands and triggers the VALID clause for the foundation READ. However, if the child READ command issues another (third) READ command, terminating the third READ command does not trigger the VALID clause.

During a normal READ command (with a GET clause), the following events trigger the VALID clause: pressing CTRL+W, pressing ESC, pressing the TAB key past the last GET when READ CYCLE is off, or pressing TAB past the first GET when READ CYCLE is off. Note that issuing a CLEAR READ command does not trigger the VALID clause.

During a foundation READ (without a GET clause), the following events trigger the VALID clause: pressing CTRL+W, pressing ESC, clicking the mouse, and any key press that does not correspond to a menu selection or to an ON KEY LABEL command.


Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a keypress
KBCategory: kbprg
KBSubcategory: FxprgGeneral


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 29, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.