View previous topic :: View next topic |
Author |
Message |
zsuppguy Beginner
Joined: 29 Dec 2009 Posts: 1 Topics: 1
|
Posted: Thu Jan 07, 2010 3:44 pm Post subject: use of rexx proc |
|
|
I have the following code and it works perfectly to me.
Code: | /*REXX*/
call procedure pro01
say gr.1
say gr.2
exit
pro01: procedure expose gr.
gr.0=2
gr.1=a
gr.2=b
return |
Now, i need to use the same gr. array into another procedure "pro02" which will be called after the "say" statements.
But i keep receiving a msg saying the array is empty. Should this array be declared in another way ? |
|
Back to top |
|
 |
jsharon1248 Intermediate
Joined: 08 Aug 2007 Posts: 291 Topics: 2 Location: Chicago
|
Posted: Thu Jan 07, 2010 4:34 pm Post subject: |
|
|
I got a syntax error on the 'call'. I just deleted the word 'procedure' from your call statement and it all worked fine for me.
Code: |
/*REXX*/
call pro01
say gr.1
say gr.2
call pro02
say gr.1
say gr.2
exit
pro01: procedure expose gr.
gr.0=2
gr.1=a
gr.2=b
return
pro02: procedure expose gr.
gr.1=x
gr.2=y
return |
Btw, REXX really doesn't support arrays. The variables you're using are compound symbols and stems. |
|
Back to top |
|
 |
|
|