home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.rexx
- Path: sparky!uunet!noc.near.net!ns.draper.com!news.draper.com!MVS.draper.com!SEB1525
- From: SEB1525@MVS.draper.com (Steve Bacher)
- Subject: Using whitespace characters as delimiters (was: Blanks, REXX, and portability...)
- Message-ID: <19920908172142SEB1525@MVS.draper.com>
- Sender: MVS NNTP News Reader <NNMVS@MVS.draper.com>
- Nntp-Posting-Host: mvs.draper.com
- Organization: Draper Laboratory
- References: <1992Sep8.154048.1@sejnet.sunet.se>
- Date: Tue, 8 Sep 1992 22:21:00 GMT
- Lines: 38
-
- In article <1992Sep8.154048.1@sejnet.sunet.se>,
- eric@sejnet.sunet.se (Eric Thomas) writes:
-
- >In article <19920907131702SEB1525@MVS.draper.com>, SEB1525@MVS.draper.com (Steve Bacher) writes:
- >> At least with the more reasonable proposals,
- >>
- >> PARSE VALUE DIAG(something) WITH var1 var2 '15'x var3 var4 '15'x var5
- >>
- >> should continue to work just fine, regardless of whether '15'x is
- >> considered whitespace or not. A correct implementation of REXX will
- >> break up the line at the '15'xes and only then perform the whitespace
- >> analysis on the resulting pieces.
- >
- >Yes, that much will work, and it is indeed what people generally code to
- >process the output of commands which produce a fixed-size answer (like when
- >extracting the time zone name from QUERY TIME). But there are many commands
- >which produce variable-size output that one processes in a loop (example: QUERY
- >NAMES).
-
- Still not that much of a problem, if you do:
-
- temp = diag(something)
- or
- parse value diag(something) with temp
-
- do while words(temp) = 0 /* or temp ^= "", or whatever */
- parse var temp stuff '15'x temp
- call do_something_with stuff
- end
-
- The same rules should apply.
-
- I do see your point about all components of the language that deal with
- whitespace needing to behave consistently. I take that as a given.
-
- --
- Steve Bacher (Batchman) Draper Laboratory
- Internet: seb@draper.com Cambridge, MA, USA
-