RdLevel()

This function returns the current read level when using READs. It has no use with forms using the Visual FoxPro event model.

Usage

nCurrentReadLevel = RDLEVEL()

Example

IF RDLEVEL()=5  && or 10, in later versions
   WAIT WINDOW "Sorry, you're maxed out. No more READs for you"
ELSE
   DO Another.SPR
ENDIF
In FoxPro 2.x, we mostly used RDLEVEL() in menu SKIP FOR conditions to prevent some options from being available when other options were in use. With a foundation READ in place, giving a menu item a SKIP FOR condition of RDLEVEL()>1 prevents the user from choosing that item when any screen is active. This is useful in modal applications and for items that need to be the only thing running, like reindex routines.

See Also

Read


Back to Table of Contents

Copyright © 2002-2018 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. Click for license .