View previous topic :: View next topic |
Author |
Message |
Dibakar Advanced
Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Wed Sep 28, 2005 4:20 am Post subject: Initialize rexx variables using interpret command |
|
|
I have some variables a1, a2, ... a9 used in a panel. What would be an efficient way to initialize them.
I tried the following but it is giving syntax error.
Code: |
do i = 1 to 9; interpret 'a'i = ""''; end
|
|
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
Dibakar Advanced
Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Wed Sep 28, 2005 4:46 am Post subject: |
|
|
I missed one quote. Following code is working.
Code: |
do i = 1 to 9; interpret 'a'i' = ""'; end
|
|
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Wed Sep 28, 2005 7:59 am Post subject: |
|
|
Probably the most efficient way is:
Parse value "" with a1 a2 a3 a4 a5 a6 a7 a8 a9
2nd would be to use the value() function.
As usual, Interpret can be used as a last resort. |
|
Back to top |
|
|
Dibakar Advanced
Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Wed Sep 28, 2005 9:35 pm Post subject: |
|
|
kolusu,
that was quick!
actually i was searching for array, if i had serached for interpret then i wouldn't have missed.
thanks,
diba. |
|
Back to top |
|
|
Dibakar Advanced
Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Thu Oct 06, 2005 1:48 am Post subject: |
|
|
Hi Semigeezer,
I didn't notice your reply earlier, only kolosus's reply was visible then. Cannot understand why?
Thanks for the answers,
Diba. |
|
Back to top |
|
|
|
|