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