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.92Sep5135020@grover.cs.unc.edu>
- Date: 5 Sep 92 17:50:20 GMT
- References: <REXXLIST%92082621432914@DEARN> <mwm.1p79@contessa.palo-alto.ca.us>
- <1992Sep5.132440.1@sejnet.sunet.se>
- Sender: news@cs.unc.edu
- Organization: UNC Department of Computer Science
- Lines: 40
- In-reply-to: eric@sejnet.sunet.se's message of 5 Sep 92 13:24:40 GMT
-
- I hate to throw a hint of reason into an otherwise promising flame war,
- but I'm not at all clear on what the problem is.
-
- 1. I don't think any sensible interpretation of pos('a b'...) would
- permit it to match on either 'a<blank>b' or 'a<tab>b'. I'd certainly
- consider such an implementation buggy.
-
- 2. On the other hand, I don't quite see the problem in say parsing a
- line with 'parse <source> foo bar' as separating the foo and bar
- substrings with arbitrary whitespace. That behavior would both fit
- standard conventions in widely-used interactive environments AND
- seems consistent with other rexx conventinos. (After all, even a new
- rexx programmer like me has noticed that parse doesn't care if it is
- only one blank space or several between the substrings. Nor would
- one want it to be different.)
-
- 3. The use of tabs vs spaces in other systems is very generally such
- that columnar counts count a TAB char as a SINGLE character, i.e.
- "a\tb" is a three character string in C. It more or less must be
- that way since the 'padded' interpretation of a tab is dependent on
- the context -- the tab in "a\tb" isn't the same apparent width as the
- tab in "ab\tc", and the problem only gets worse in a proportional
- font.
-
- So what's the problem with
-
- parse arg foo bar
-
- parsing with the blank being an assumed regular expression of [ \t]+,
- but with columnar counts remaining as they always have been? You could
- always parse with foo' 'bar if you want to insist on blanks by ghod.
- --
- 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.
-