home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rox.zip / wordlist.rox < prev   
Text File  |  1993-08-28  |  1KB  |  51 lines

  1. :*------------------------------------------------------------------
  2. :* REXX Object eXtensions : list class
  3. :*------------------------------------------------------------------
  4.  
  5. :class wordlist
  6.  
  7. :include collect.rox
  8.  
  9. :inherits collection
  10.  
  11. :vars list
  12.  
  13. :*------------------------------------------------------------------
  14. :* create a list
  15. :*------------------------------------------------------------------
  16. :method init
  17.    list = ""
  18.  
  19.    return
  20.  
  21. :*------------------------------------------------------------------
  22. :* return number of items
  23. :*------------------------------------------------------------------
  24. :method size
  25.    return words(list)
  26.  
  27. :*------------------------------------------------------------------
  28. :* add an item to the list
  29. :*------------------------------------------------------------------
  30. :method add
  31.    list = list arg(1)
  32.  
  33.    return self
  34.  
  35. :*------------------------------------------------------------------
  36. :* get an item
  37. :*------------------------------------------------------------------
  38. :method atIndex
  39.    index = arg(1)
  40.  
  41.    return word(list,index)
  42.  
  43. :*------------------------------------------------------------------
  44. :* get an item
  45. :*------------------------------------------------------------------
  46. :method at
  47.    index = arg(1)
  48.  
  49.    return word(list,index)
  50.  
  51.