I'm using Foxpro 2.6 on a Win95 platform.
I declare 18 variables to be the numbers 1-18, so i can use meaningful
labels in my code, rather than the numbers. (this also makes it easy to
change the order certain details are examined)
These 18 name constants are declared PUBLIC in the Setup snippet of the
ScreenBuilder, then initialized to their values.
The screen control (@ GET) calls a procedure, which conditionally calls
another procedure to do the specific work in each case. When the
working procedure tries to reference the global variable, the procedure
works the first time it is entered- but the second time the procedure is
called, the program halts because the variable (my public constant)
cannot be found. Debug shows no value just after control passes to the
procedure (the second time)
Is there a scoping restriction that makes variables available only to
immediate child procedures, but not grandchildren? Is there a way
around this, without actually passing 18 extra parameters? (possibly
something like VBa (Excel 5.0) "ParamArray")
--- PCBoard (R) v15.3 (OS/2) 5
---------------
* Origin: Yardley, PA (1:273/239)
|