How to Determine the Current DO Nesting LevelID: Q104047 2.50 2.50a | 1.02 2.00 2.50 2.50a
The information in this article applies to:
SUMMARYFoxBASE+ and FoxPro allow DO programs to be nested. The maximum number of nesting levels for FoxBASE+ is 24, while FoxPro allows a maximum of 32 levels and Visual FoxPro allows a maximum of 128 levels. Exceeding this limit results in error number 103, "DO nesting too deep."
MORE INFORMATIONDO levels are incremented as follows: 1. When a DO program1 command is issued in the Command window, the DO level 2. If program1 includes a DO program2 statement, the DO level is
3. If a called program returns to a calling program, either by executing
The following procedure allows you to determine the current DO level
through use of the SYS(16) function. The SYS(16) function returns the name
of the currently executing program. It also allows an optional numeric
argument that indicates from how many levels back the program name should
be fetched.
1. Create a program named DOLVL.PRG with the following commands:
2. Save and execute the program. A message will be displayed as follows:
3. Create a program named TEST.PRG with the following command and execute
4. A message will be displayed as follows:
Additional reference words: VFoxWin 3.00 FoxDos FoxWin 1.02 2.00 2.50
2.50a foxbase+/mac
KBCategory: kbprg
KBSubcategory: FxenvMemory
|
Last Reviewed: May 13, 1998 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |