chenna.deepa
29th April 2008, 12:55
Hi all,
can we return 4 variables to a function
we can but how to do it..
please tell me the syntax
thanks in advance
deepa
george7a
29th April 2008, 13:08
Hi,
There are more than one way to do this. One of the ways is to give the function a variables by ref. You can read about it here:
http://www.baanboard.com/programmers_manual_baanerp_help_3gl_features_function_arguments
I hope it helps,
- George
chenna.deepa
29th April 2008, 15:27
hi all,
i have written code in this manner:
long ret.val(3)
long a,b,c
choice.cont.process:
on.choice:
ret.val=add.data()
message(" c = " &str$(c))
function long add.data()
{
b=4
c=9
c = a+b
message("c =" &str$(c))
return(a,b,c)
}
i am getting errors it is not possible to use return of a function as reference to array
i jus want to 3 values to a function ....return(a,b,c)
how to do it
thanks in advance
deepa
zardoz
29th April 2008, 16:14
Just remove the return statement and the 'long' from the function declaration. You had declared a,b,c as global variables. No need to return them.
chenna.deepa
30th April 2008, 07:34
Hi all,
can anyone tell me how to return more then one value in functions
is this possible..if yes ..then how to do it..
please explain me about the body of the function
thanks in advance
deepa
NirajKakodkar
30th April 2008, 08:46
Hi Chenna ,
You can try this ..
function XYZ(domain yyy arg1 ,
ref domain yyy ret1 ,
ref domain yyy ret2 )
{
............................
............................
............................
}