Stem variables and subst
04-Jun-93 18:11:25
Sb: #35074-Stem variables and subst
Fm: Robert Wilcox 70107,717
To: John Toebes/SYSOP 70007,3467
This sort of thing was recently driving me nuts. I finally wrote a pair of
library routines for setting/getting compound variables. Inside the library,
expressions are received already evaluated by ARexx so you just convert to
uppercase and use the RVI. This technique works when the seemingly obvious
fails. You can pass a literal 'stem.1' or a build up the stemname for use in
iterative loops:
astem = someotherstem.1.name
do i = 1 to n
astr = getvar(astem'.'i)
say astr
end
If astem evaluates to 'sam', the loop prints the values of sam.1..sam.n