Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!ispd-newsserver!jeffv From: jeffv@bisco.kodak.com (Jeff Van Epps) Newsgroups: comp.lang.rexx Subject: Iterating on Stems Message-ID: <1991Mar9.215906.4976@ssd.kodak.com> Date: 9 Mar 91 21:59:06 GMT Sender: news@ssd.kodak.com Reply-To: jeffv@bisco.kodak.com (Jeff Van Epps) Followup-To: comp.lang.rexx Organization: Eastman Kodak Lines: 23 Hi gang. I just got ARexx, and I've translated some Perl scripts to Arexx. The Perl scripts used associative arrays, for which the ARexx equivalent seems to be "stems" or "compound symbols". Putting data in worked fine, but getting them out was more complicated than necessary. PERL: while (($key,$value) = each(assocary)) { /* stuff */ } ARexx: ??? The question is, once you've stored the data, how do you get the system to iterate over the "array", telling you the keys? I solved it by storing the keys at the same time as the data, in a more normal array (keys.1 keys.2 keys.3 etc.), with a count of how many keys have been processed so far. But this strikes me as a kludgy workaround for a missing language feature. Does the language feature exist and I just missed it?? -- If the From: line says nobody@kodak.com, don't believe it. Jeff Van Epps jeffv@bisco.kodak.com rochester!kodak!bisco!jeffv