1

Topic: How to return three values

In procedure three variables are transferred
do xxx with x, y, z
How it is possible to return these three variables? Except a variant return (x+y+z)

2

Re: How to return three values

Transfer the link to a variable in parameters

local x
x = 10
test (>>>@<<<x)
? x
proc test
lpara y
y = 20
return

3

Re: How to return three values

q1w1e1 wrote:

As it is possible to return these three variables?

Any very strange understanding of the term to "return"...
If it is necessary to transfer in procedure three values for their change in this procedure apply parameter passing under the link and do not apply thus the term to "return".

4

Re: How to return three values

Dima T;
Created the form, added the button, in the button of a method of cliques a test example, function placed in other file (test.prg), like works, and if test.prg is not near to this form, as then to cause this function?

5

Re: How to return three values

q1w1e1 wrote:

Dima T;
Created the form, added the button, in the button of a method of cliques a test example, function placed in other file (test.prg), like works, and if test.prg is not near to this form, as then to cause this function?

As before. In the same way as any  function or a method. Call rules the method of transmission of parameter does not change, changes in any way.

6

Re: How to return three values

Dima T;
Something as and does not transit earlier. :-)
do my_prg\test with @x, @y, @z
In a form method produces an error.

7

Re: How to return three values

For do... with... Transmission under the link does not work. Add my_prg in SET PATH and cause

test (@x, @y, @z)

8

Re: How to return three values

Still there is a second method, to write PARAMETERS without L

local x
x = 10
do test with x
? x
proc test
==> para y
y = 20
return

Will work at

SET UDFPARMS TO REFERENCE

9

Re: How to return three values

Thanks