In the VO dialect, the following code runs correctly. In the VFP dialect, when trying to access a PUBLIC defined in a called routine, throws a runtime error that the var does not exist:
#pragma options("memvar", enable)
#pragma options("undeclared", enable)
FUNCTION Start() AS VOID
PUBLIC public_test
public_test := "public_test"
PUBLIC private_test
private_test := "private_test"
SomeProc()
? public_nested // XSharp.Error: Variable does not exist: public_nested
RETURN
PROCEDURE SomeProc() AS VOID
? public_test
? private_test
PUBLIC public_nested
public_nested := "public_nested"
? public_nested
In the VO dialect, the following code runs correctly. In the VFP dialect, when trying to access a PUBLIC defined in a called routine, throws a runtime error that the var does not exist: