home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / rexx / 941 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  3.3 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.92Sep8132954@grover.cs.unc.edu>
  6. Date: 8 Sep 92 17:29:54 GMT
  7. References: <1992Sep6.022654.1@sejnet.sunet.se> <19920907131702SEB1525@MVS.draper.com>
  8.     <1992Sep8.154048.1@sejnet.sunet.se>
  9. Sender: news@cs.unc.edu
  10. Organization: UNC Department of Computer Science
  11. Lines: 57
  12. In-reply-to: eric@sejnet.sunet.se's message of 8 Sep 92 15:40:48 GMT
  13.  
  14. In article <1992Sep8.154048.1@sejnet.sunet.se> 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
  27.    to process the output of commands which produce a fixed-size answer
  28.    (like when extracting the time zone name from QUERY TIME). But there
  29.    are many commands which produce variable-size output that one
  30.    processes in a loop (example: QUERY NAMES). What bothers me is that
  31.    we now have '15'x = ' ', a situation most programmers must NOT have
  32.    quite expected. My own programs would not be affected since I always
  33.    use ==, but the amount of spontaneous religious flames I get about
  34.    this usage from people who have read my code for the first time
  35.    suggests that most programmers do use = and thus their programs would
  36.    break.
  37.  
  38. Hmmm.  It seems as if there are multiple topics in this, all
  39. confabulated together.
  40.  
  41. (1) Should newline be considered a whitespace character, or more
  42.    generally should the rexx definition of whitespace be equivalent to
  43.    anything for which unix isspace() returns 1?
  44.  
  45. I think the answer is "no".  Even other UNIX languages that are line-
  46. oriented (like awk) don't do this.  It's clear that for any language
  47. serving similar purposes to rexx and awk, newline must be distinguished
  48. from Blank, tab, formfeed, VT etc.
  49.  
  50. (2) Should parse (and WORDS, WORDPOS, etc) be extended or modified to
  51.    make any arbitrary whitespace a word separator?
  52.  
  53. I've already argued that it is more orthogonal and more uniform to
  54. answer "yes".
  55.  
  56. (3) Should parse be extended with some kind of general regular
  57.    expression mechAnism?
  58.  
  59. I think it's worth seriously considering -- before I fell asleep last
  60. night I got thinking about some of the things one could do with an
  61. appropriate rexexp parse, and it's pretty exciting.
  62. --
  63. Charles R. Martin/(Charlie)/martinc@cs.unc.edu/(ne crm@cs.duke.edu) 
  64. O/Dept. of Computer Science/CB #3175 UNC-CH/Chapel Hill, NC 27599-3175
  65. H/3611 University Dr #13M/Durham, NC 27707/(919) 419 1754
  66. ----------------------------------------------------------------------
  67. "I am he who walks the States with a barb'd tongue, questioning every
  68. one I meet,/Who are you that wanted only to be told what you knew
  69. before?/ Who are you that wanted only a book to join you in your
  70. nonsense?"  _Leaves of Grass_ xxiii.4.
  71.