home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / rexx / 946 < prev    next >
Encoding:
Text File  |  1992-09-08  |  1.9 KB  |  51 lines

  1. Newsgroups: comp.lang.rexx
  2. Path: sparky!uunet!noc.near.net!ns.draper.com!news.draper.com!MVS.draper.com!SEB1525
  3. From: SEB1525@MVS.draper.com (Steve Bacher)
  4. Subject: Using whitespace characters as delimiters (was: Blanks, REXX, and portability...)
  5. Message-ID: <19920908172142SEB1525@MVS.draper.com>
  6. Sender: MVS NNTP News Reader <NNMVS@MVS.draper.com>
  7. Nntp-Posting-Host: mvs.draper.com
  8. Organization: Draper Laboratory
  9. References: <1992Sep8.154048.1@sejnet.sunet.se>
  10. Date: Tue, 8 Sep 1992 22:21:00 GMT
  11. Lines: 38
  12.  
  13. In article <1992Sep8.154048.1@sejnet.sunet.se>,
  14. eric@sejnet.sunet.se (Eric Thomas) writes:
  15.  
  16. >In article <19920907131702SEB1525@MVS.draper.com>, SEB1525@MVS.draper.com (Steve Bacher) writes:
  17. >> At least with the more reasonable proposals,
  18. >>
  19. >>  PARSE VALUE DIAG(something) WITH var1 var2 '15'x var3 var4 '15'x var5
  20. >>
  21. >> should continue to work just fine, regardless of whether '15'x is
  22. >> considered whitespace or not.  A correct implementation of REXX will
  23. >> break up the line at the '15'xes and only then perform the whitespace
  24. >> analysis on the resulting pieces.
  25. >
  26. >Yes, that much will work, and it is indeed what people generally code to
  27. >process the output of commands which produce a fixed-size answer (like when
  28. >extracting the time zone name from QUERY TIME). But there are many commands
  29. >which produce variable-size output that one processes in a loop (example: QUERY
  30. >NAMES). 
  31.  
  32. Still not that much of a problem, if you do:
  33.  
  34. temp = diag(something)
  35.  or
  36. parse value diag(something) with temp
  37.  
  38. do while words(temp) = 0   /* or temp ^= "", or whatever */
  39.  parse var temp stuff '15'x temp
  40.  call do_something_with stuff
  41. end
  42.  
  43. The same rules should apply.
  44.  
  45. I do see your point about all components of the language that deal with
  46. whitespace needing to behave consistently.  I take that as a given.
  47.  
  48. --
  49. Steve Bacher (Batchman)                 Draper Laboratory
  50. Internet: seb@draper.com                Cambridge, MA, USA
  51.