home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!concert!borg!news_server!martinc
- From: martinc@grover.cs.unc.edu (Charles R. Martin)
- Newsgroups: comp.lang.rexx
- Subject: Re: Blanks, REXX, and portability...
- Message-ID: <MARTINC.92Sep8132026@grover.cs.unc.edu>
- Date: 8 Sep 92 17:20:26 GMT
- References: <REXXLIST%92090516060285@UGA.CC.UGA.EDU>
- <MARTINC.92Sep7194817@grover.cs.unc.edu>
- <1992Sep8.155436.1@sejnet.sunet.se>
- Sender: news@cs.unc.edu
- Organization: UNC Department of Computer Science
- Lines: 53
- In-reply-to: eric@sejnet.sunet.se's message of 8 Sep 92 15:54:36 GMT
-
- In article <1992Sep8.155436.1@sejnet.sunet.se> eric@sejnet.sunet.se (Eric Thomas) writes:
-
- > I think I should direct you to the note where I went over precisely what
- > I meant using regular expressions.
-
- Did you read your own note? I am getting the impression you are replying to
- the wrong message by mistake.
-
- > But I think your example is flawed:
-
- My examples are not flawed. I have written enough REXX code to know
- what a simple PARSE clause like the ones I quoted above does, if you
- don't believe me feel free to run them through your favourite
- interpreter.
-
- Then you should know enough about rexx code to answer my questions,
- shouldn't you?
-
- As you said (and if I ever said the opposite I'd like
- you to show me where), PARSE does indeed strip both leading and
- trailing blanks from the first N-1 variables in a word parsing
- clause. That is precisely why you will lose column positioning if you
- use this form of parsing, as arbitrary amounts of blanks (or
- whitespace in your proposal) are silently eaten up. The only way you
- can remember what columns things were at is if you don't use this
- form of the PARSE statement, in which case it is totally immaterial
- whether or not it treats tabs as whitespace when parsing by word,
- since you won't be parsing by word, and again the conclusion is that
- having this behaviour does not help you in cases where you have:
-
- > > repeated applications of parse, say with columnar fields.
-
- Let me see -- parse for words *does* eat up all the intervening blanks
- (pretty much what I expect), does lose column positioning, and blanks
- are word separators in a words clause. It really appears as if you
- either
-
- (a) really think that "a<tab>b" ought to be a "word" in the
- words-clause sense -- which seems massively counter-intuitive -- or
-
- (b) that you agree sensible behavior is that any whitespace character
- NOT OTHERWISE INTERPRETED (like newline) ought to be a word separator.
-
- If (a), I'd really like to see it defended. It seems a massive flaw.
- --
- Charles R. Martin/(Charlie)/martinc@cs.unc.edu/(ne crm@cs.duke.edu)
- O/Dept. of Computer Science/CB #3175 UNC-CH/Chapel Hill, NC 27599-3175
- H/3611 University Dr #13M/Durham, NC 27707/(919) 419 1754
- ----------------------------------------------------------------------
- "I am he who walks the States with a barb'd tongue, questioning every
- one I meet,/Who are you that wanted only to be told what you knew
- before?/ Who are you that wanted only a book to join you in your
- nonsense?" _Leaves of Grass_ xxiii.4.
-