One option is to join multiple values into one variable, separated by a character of some sort and then, in the calling program, extract them from the returned variable.
A different option is to return an object that has properties that are the multiple variables you want to return.
You can use global variables (public ones) thet you can set in your form.
Try something liuke this:
public returned1,returned2,returned3
do form yourform && the form will initialize the variables
.........
*here you should use your returned values
release returned1,returned2,returned3
In your form, you should have:
returned1 = value_1_you_need
returned2 = value_2_you need
......etc.......
I would return an Array where you can stuff all the values into you like. The only Problem is how to deal with the Param. My way to solve the problem is shown in the example:
Create a Form with one Button and write the following code in the Click Event:
DIMENSION paramArray(3) && could be of any dimension...
STORE "" TO paramArray && just to initialize, no special purpose
SET UDFPARMS TO REFERENCE && to be sure that it works by reference
DO FORM form2 WITH paramArray
?paramArray(1)
?paramArray(2)
?paramArray(3)
Create a second Form (be sure to set it modal) with one Button and write in the Click Event the following code:
THISFORM.RELEASE
In the Init-Event of the form write:
PARAMETER ParamArray
In the Unload-Event of the form write:
ParamArray(1) = "This is the Number"
ParamArray(2) = 1
ParamArray(3) = "Solution"
return ParamArray
It's important to catch the params in the Init and to return the params in the Unload-Event!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.