Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Program() and Sys(16)
Message
From
03/06/1999 11:14:15
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
02/06/1999 09:16:30
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00225125
Message ID:
00225978
Views:
19
>Yes - I'm aware of the '0' and '1' parms - but the help for Program(nLevel) states:
>
>"nLevel Specifies how many program levels back the program name is to be found. This parameter can range from 0 to the program nesting depth. A program can execute another program which can execute another program, and so on. Programs may be nested to 128 levels."
>
>"1" and "0" are special cases that return the "top level" calling program, but a parameter of "2" should give me the previous calling method - "3" the previous one to that - and so on - and as I said, it doesn't seem to work.
>
>Ken

The Help - well, I don't care what it says. Actually, the parameter denotes the order in which the routine was called, so prog(0) or prog(1) returns the master program, prog(2) the first called one, ... and prog(n) returns the name of the routine called from prog(n-1). It always worked this way (since sys(16) in FoxPlus) and, yes, the help was always somewhat confusing on the subject.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform