how can i return more than one value from rexx function



IBM's Command List programming language & Restructured Extended Executor

how can i return more than one value from rexx function

Postby thiruj » Tue Jul 28, 2009 2:51 pm

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..
thiruj
 
Posts: 4
Joined: Fri Jul 17, 2009 6:25 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby MrSpock » Tue Jul 28, 2009 3:18 pm

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.
User avatar
MrSpock
Global moderator
 
Posts: 807
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times

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

Postby thiruj » Tue Jul 28, 2009 3:24 pm

hi MR spock,

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

thanks & regards
thiru..
thiruj
 
Posts: 4
Joined: Fri Jul 17, 2009 6:25 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby expat » Tue Jul 28, 2009 4:28 pm

In the called function - return a list of variables
In the calling code, these will be space seperated, so parse them
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times

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

Postby BChat » Wed Jul 29, 2009 9:46 pm

Hi,
You can use EXPOSE in the function definition to pass the callers vars by referrence

BChat
BChat
 
Posts: 19
Joined: Thu Jun 11, 2009 8:20 pm
Has thanked: 0 time
Been thanked: 0 time


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post