Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Program() and Sys(16)
Message
From
03/06/1999 08:15:53
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00225125
Message ID:
00225867
Views:
24
thanks Jim, pity there's not a NESTLEVEL() or something similar huh?

Ken

>>Jim,
>>
>>thanks - that works ... but ... is ther any way to tell what nesting level my program is at? If not, with it working the way you've outlined, how to I move "up" a specific number of steps up the call stack? In other words, how can I return to the program "that is 4 level above me" for instance?
>>
>>Ken
>
>Ken,
>
>You can do something like this;
>
>
>LPARAMETERS pnLevelsUp
>
>LOCAL lcPrg, lnLevel
>lnLevel = 1
>lcPrg = PROGRAM(1)
>DO WHILE NOT EMPTY(lcPrg)
>   lnLevel = lnLevel + 1
>   lcPrg = Program(lnLevel)
>ENDDO
>lnLevel = lnLevel - pnLevelsUp - 1
>lnLevel = IIF(lnLevel<1,1,lnLevel)
>RETURN Program(lnLevel)
>
Ken B. Matson
GCom2 Solutions
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform