home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rio111.zip / tryme.nrx < prev   
Text File  |  1996-09-17  |  2KB  |  55 lines

  1. /* tryme.nrx - Part of RXFile 1.06, Max Marsiglietti 1996 */
  2.  
  3. import RXFile
  4.  
  5. rArray = Rexx[] null
  6. iCount = int 0
  7. bExit = boolean 0
  8. RXIt = RXFile null
  9. bSepCurs = boolean 1
  10. bRN = boolean 1
  11.  
  12.  
  13. RXIt = RXFile()
  14. say RXIt.setparms(bSepCurs, bRN)
  15.  
  16. say 'Opening: ' RXIt.stream('tryme.nrx','c','open')
  17. say 'Status: 'RXIt.stream('d')
  18. say 'Seeking at +0 brings: 'RXIt.stream('c','seek +0')
  19. say 'Seeking at =5 brings: 'RXIt.stream('c','seek =5')
  20. say 'Seeking at +10 brings: 'RXIt.stream('c','seek +10')
  21. say 'Seeking at +0 brings: 'RXIt.stream('c','seek +0')
  22.  
  23. say 'Query exists: 'RXIt.stream('c','query exists')
  24. say 'Query size: 'RXIt.stream('c','query size')
  25. say 'Query datetime: 'RXIt.stream('c','query datetime')
  26.  
  27. say 'Seeking at <0 brings: 'RXIt.stream('c','seek <0')
  28. say 'Seeking at -10 brings: 'RXIt.stream('c','seek -10')
  29.  
  30. say 'R-seeking at =20 brings: 'RXIt.stream('c','rseek =20')
  31. say 'R-seeking at +7 brings: 'RXIt.stream('c','rseek +7')
  32.  
  33. say 'W-seeking at -10 brings: 'RXIt.stream('c','wseek -10')
  34. say 'W-seeking at +2 brings: 'RXIt.stream('c','wseek +2')
  35.  
  36. say 'Status: 'RXIt.stream('d')
  37. say 'Closing: 'RXIt.stream('c','close')
  38. say 'Status: 'RXIt.stream('d')
  39.  
  40. say 'Trying to seek: 'RXIt.stream('c','seek +0')
  41.  
  42. RXIt.charout("Type a word and press enter: >")
  43. say 'You typed, as first letter: '||RXIt.charin()
  44. say RXIt.chars()||' chars remaining in the queue.' 
  45. say "(Warning: This one doesn't return correct values with stdio..)"
  46.  
  47. RXIt.lineout("This one is .lineout with standard output. Watch for filetree:")
  48. rArray = RXIt.filetree(".")
  49. loop until bExit = 1
  50.  say rArray[iCount]
  51.  iCount = iCount + 1
  52. catch AIOOBE=ArrayIndexOutOfBoundsException
  53.  bExit = 1
  54. end
  55.