Page 1 of 1

how can i return more than one value from rexx function

PostPosted: Tue Jul 28, 2009 2:51 pm
by thiruj
Hi everybody,

how can we return more than one values from the function...

actuall my requirement like this... i call one function from the main function with one argument.. after that i want to return 3 values from the calling function to the main function... can anybody send the code for the above requirement...

thanks & regards
thiru..

Re: how can i return more than one value from rexx function

PostPosted: Tue Jul 28, 2009 3:18 pm
by MrSpock
You have to return the three values as one variable (you'll want to concatenate them into a single string), then you'll have to PARSE them out from the one variable.

Re: how can i return more than one value from rexx function

PostPosted: Tue Jul 28, 2009 3:24 pm
by thiruj
hi MR spock,

acually i want to return 3 seperate variables from the function or subroutine to main function

thanks & regards
thiru..

Re: how can i return more than one value from rexx function

PostPosted: Tue Jul 28, 2009 4:28 pm
by expat
In the called function - return a list of variables
In the calling code, these will be space seperated, so parse them

Re: how can i return more than one value from rexx function

PostPosted: Wed Jul 29, 2009 9:46 pm
by BChat
Hi,
You can use EXPOSE in the function definition to pass the callers vars by referrence

BChat