One of 4 ways:
1- Define a private variable which the called program
knows about.
2- Pass in the name of the private variable in
a character variable (better)
3- Redesign so you can call it as a function and pass a variable by reference
4- Same as 3, but just return the value
* 3-4 can also be easily accomplished by issuing a
* set procedure to (program name) additive and calling
* your program as a function
1-
private vReturn
vReturn = .f. && Have to define the var
DO check_status WITH 'T'
procedure check_status
lparam vArg1
* Processing...
vReturn = somevalue
2-
private vReturn
vReturn = .f. && Have to define the var
DO check_status WITH 'T', "vReturn"
procedure check_status
lparam vArg1, vReturnVal
* Processing...
&vReturnVal = somevalue
3-
local vReturn
=check_status('T',@vReturn)
procedure check_status
lparam vArg1, vReturnValue
* Processing...
vReturnValue = somevalue
4-
local vReturn
vReturn = check_status WITH 'T'
procedure check_status
lparam vArg1
* Processing...
return somevalue