home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / rexx / 1019 < prev    next >
Encoding:
Text File  |  1992-09-15  |  952 b   |  35 lines

  1. Newsgroups: comp.lang.rexx
  2. Path: sparky!uunet!sun-barr!ames!haven.umd.edu!darwin.sura.net!cs.ucf.edu!ocoee!mcampbel
  3. From: mcampbel@ocoee (Mike Campbell )
  4. Subject: compound variable question
  5. Message-ID: <1992Sep15.155313.2494@cs.ucf.edu>
  6. Sender: news@cs.ucf.edu (News system)
  7. Organization: University of Central Florida
  8. X-Newsreader: Tin 1.1 PL4
  9. Date: Tue, 15 Sep 1992 15:53:13 GMT
  10. Lines: 23
  11.  
  12. Is there any way to 'remember' the indices used in compound variables?
  13.  
  14. i.e., I have some rexx code that gathers words from a text file, 
  15.  
  16. then, I do this:
  17.  
  18. count.word = count.word + 1
  19.  
  20. where 'word' the actual word having been gotten.  The upshot of this is
  21. that the 'count' array ends up looking like:
  22.  
  23. count.'if' = 3
  24. count.'then' = 2
  25. count.'anything_else' = 1
  26.  
  27. etc.
  28.  
  29. Is there any way to go through the indices of count, without having to
  30. specifically keep track of the words used as the indices?
  31.  
  32. (Similar to awk: for (index in array) {} type of thing...)
  33.  
  34.  
  35.