Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Program() and Sys(16)
Message
From
02/06/1999 09:16:30
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00225125
Message ID:
00225309
Views:
17
Ronald,

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


>This is working correctly.
>
>Program() will return the name of the progrm you are in in this case TEST3
>
>Use Program(1) or (0) to return the master program
>
>
>Ron
>
>>Hi,
>>
>>Is there a bug in the Program() and Sys(16) fucntions or am I misunderstanding something. I have test.prg that calls test2.prg .... test2.prg then calls test3.prg ....
>>
>>in test3.prg I have the lines
>>
>>? Program()
>>? Program(2)
>>? Program(3)
>>
>>which according to help should return ...
>>
>>TEST3
>>TEST2
>>TEST
>>
>>but which in practice returns ...
>>
>>TEST3
>>TEST2
>>TEST3 (again) ??????
>>
>>Any ideas? Can anyone confirm? Sys(16) behaves the same way (VFP5.0a)
>>
>>thanks! Ken
Ken B. Matson
GCom2 Solutions
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform