home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / rexx / 900 < prev    next >
Encoding:
Internet Message Format  |  1992-09-07  |  2.5 KB

  1. Path: sparky!uunet!gatech!concert!borg!news_server!martinc
  2. From: martinc@grover.cs.unc.edu (Charles R. Martin)
  3. Newsgroups: comp.lang.rexx
  4. Subject: Re: Blanks, REXX, and portability...
  5. Message-ID: <MARTINC.92Sep5135020@grover.cs.unc.edu>
  6. Date: 5 Sep 92 17:50:20 GMT
  7. References: <REXXLIST%92082621432914@DEARN> <mwm.1p79@contessa.palo-alto.ca.us>
  8.     <1992Sep5.132440.1@sejnet.sunet.se>
  9. Sender: news@cs.unc.edu
  10. Organization: UNC Department of Computer Science
  11. Lines: 40
  12. In-reply-to: eric@sejnet.sunet.se's message of 5 Sep 92 13:24:40 GMT
  13.  
  14. I hate to throw a hint of reason into an otherwise promising flame war,
  15. but I'm not at all clear on what the problem is.
  16.  
  17. 1. I don't think any sensible interpretation of pos('a b'...) would
  18.    permit it to match on either 'a<blank>b' or 'a<tab>b'.  I'd certainly
  19.    consider such an implementation buggy.
  20.  
  21. 2. On the other hand, I don't quite see the problem in say parsing a
  22.    line with 'parse <source> foo bar' as separating the foo and bar
  23.    substrings with arbitrary whitespace.  That behavior would both fit
  24.    standard conventions in widely-used interactive environments AND
  25.    seems consistent with other rexx conventinos.  (After all, even a new
  26.    rexx programmer like me has noticed that parse doesn't care if it is 
  27.    only one blank space or several between the substrings.  Nor would
  28.    one want it to be different.)
  29.  
  30. 3. The use of tabs vs spaces in other systems is very generally such
  31.    that columnar counts count a TAB char as a SINGLE character, i.e. 
  32.    "a\tb" is a three character string in C.  It more or less must be
  33.    that way since the 'padded' interpretation of a tab is dependent on
  34.    the context -- the tab in "a\tb" isn't the same apparent width as the
  35.    tab in "ab\tc", and the problem only gets worse in a proportional
  36.    font.
  37.  
  38. So what's the problem with
  39.  
  40.     parse arg foo bar
  41.  
  42. parsing with the blank being an assumed regular expression of [ \t]+,
  43. but with columnar counts remaining as they always have been?  You could
  44. always parse with foo' 'bar if you want to insist on blanks by ghod.
  45. --
  46. Charles R. Martin/(Charlie)/martinc@cs.unc.edu/(ne crm@cs.duke.edu) 
  47. O/Dept. of Computer Science/CB #3175 UNC-CH/Chapel Hill, NC 27599-3175
  48. H/3611 University Dr #13M/Durham, NC 27707/(919) 419 1754
  49. ----------------------------------------------------------------------
  50. "I am he who walks the States with a barb'd tongue, questioning every
  51. one I meet,/Who are you that wanted only to be told what you knew
  52. before?/ Who are you that wanted only a book to join you in your
  53. nonsense?"  _Leaves of Grass_ xxiii.4.
  54.