home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / rexx / 955 < prev    next >
Encoding:
Text File  |  1992-09-08  |  6.1 KB  |  140 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Path: sparky!uunet!paladin.american.edu!auvm!DKNKURZ1.BITNET!RZOTTO
  3. X-Acknowledge-To: <RZOTTO@DKNKURZ1>
  4. Message-ID: <REXXLIST%92090821571399@DEARN>
  5. Newsgroups: comp.lang.rexx
  6. Date:         Tue, 8 Sep 1992 19:35:55 MEZ
  7. Sender:       REXX Programming discussion list <REXXLIST@UGA.BITNET>
  8. From:         Otto Stolz <RZOTTO@DKNKURZ1.BITNET>
  9. Subject:      Re: Blanks, REXX, and portability...
  10. In-Reply-To:  Message of Tue, 8 Sep 92 10:21:06 PDT from <GOMBERG@UCSFVM>
  11. Lines: 127
  12.  
  13. Hello REXXperts,
  14.  
  15. apparently, some of us have been at cross-purposes, as illustrated by
  16. the exchange quoted below. The present note attempts to make sure we are
  17. all talking about the same proposals; I hope this will pour some oil on
  18. troubled waters (rather than on the flames :-)
  19.  
  20. Dave Gomberg <GOMBERG@UCSFVM.BITNET> writes:
  21. > I would really like [...] to say if they can stand it that:
  22. >    c=a||b;  say pos(a,c)
  23. > would say 0?  It is not what I mean by REXX.
  24.  
  25. On Tue, 8 Sep 1992 12:32:48 -0400 cultural elite said:
  26. > [...] explain how you get c=a||b; pos(a,c)=0 out of any sensible
  27. > proposal.
  28.  
  29. On Tue, 8 Sep 92 10:21:06 PDT Dave Gomberg said:
  30. > If the synonymy of tabs to a particular number of blanks were accepted,
  31. > and if assignment did normalization (as it often does, both in
  32. > standards and in practice) then c might well have a tab when a ended
  33. > and b began with strings of blanks.
  34.  
  35. I think nobody has proposed a *general* synonymy of tabs to any number of
  36. blanks, and nobody has proposed normalization of strings in *arbitrary*
  37. situations (e.g. during assignment).
  38.  
  39. Rather, some of us were concerned about the following facts:
  40.  
  41. - Some REXX language features are meant to do "Parsing strings into
  42.   words" or to deal in other ways with "blank-delimited words" (these are
  43.   quotes from TRL, e.g. a headline on p. 109 of my copy).
  44.  
  45. - TRL does not define the terms "word", or "blank-delimited word";
  46.   apparently, TRL pre-supposes that one particular character (the
  47.   "blank") is used to delimit words, and this character is represented
  48.   by one single bit-pattern (one per implementation, of course) --
  49.   the only redundancy being in the number of blank characters delimiting
  50.   any two words.
  51.  
  52. - The latter assumption does not hold with all character codes. Rather,
  53.   several different characters may serve to delimit words -- in major
  54.   character codes, both currently used (e.g. some ASCII implementations)
  55.   and forthcoming ones (ISO 10646).
  56.  
  57. The forthcoming REXX standard will definitely have to do something about
  58. this discrepancy. At least, it has to define its terms, unambiguously.
  59. I see the following alternatives:
  60.  
  61. - The standard could perpetuate (and rigidly define) the notion of
  62.   one single blank character -- in contrast to existing (ASCII) and
  63.   foreseeable (ISO 10646) practice.
  64.  
  65. - The standard could abandon TRL's implicit (and wrong) assumption,
  66.   while preserving a consistent (and useful) language definition.
  67.  
  68. Clearly, I am in favour of the second alternative. Note that both of its
  69. parts are equally essential! We need a truly "REXXish" language: both
  70. complying to established practice and consistent in itself.
  71.  
  72. Basically, there have been two proposals to solve this problem:
  73.  
  74. 1 Identify all language features concerned with blank-delimited words,
  75.   and define their semantics consistently and in accordance with current
  76.   and foreseeable practice.
  77.  
  78.   About a fortnight ago, I presented a temptative list of the pertinent
  79.   language features. I'll append it for those who want to re-read it.
  80.   I am proposing that these features take "white space" of any length
  81.   as word-delimiters, where "white space" may consist of any characters
  82.   that are normally used to delimit words, and whose visual represent-
  83.   ation consists of the absence of a graphic symbol. I am also proposing
  84.   that every standard-conforming implementation shall list the characters
  85.   considered as constituents of "white space" in the accompanying
  86.   documentation.
  87.  
  88. 2 Pre-suppose the existence of a "canonic" form of word-separators
  89.   (consisting of stretches of a particular bit pattern), and set up a
  90.   new language feature to allow the programmer to explicitely normalize
  91.   any string into that canonic form.
  92.  
  93.   Along these lines, there was an EXPAND() function, and a PARSE EXPAND
  94.   statement, proposed.
  95.  
  96. I think, we can unanimously agree that the following language features
  97. do *not* deal with words, hence should preserve their present meaning
  98. viz. leave the data *unaltered*:
  99. - literals,
  100. - assignment, and parameter passing,
  101. - parsing with literal, positional, and variable patterns,
  102. - strict comparative operators,
  103. - built-in functions that take character positions or field lengths
  104.   as arguments, such as SUBSTR,
  105. - concatenation without an intervening blank (||-operator, or abuttal).
  106.  
  107. Note that consistency requisites pertaining to words should involve the
  108. blank-operator rather than the ||-operator, e.g. the expression
  109.       space(a b) = space(a) space(b)
  110. should always yield 1.
  111.  
  112. Now the positions are clear (as I hope), we should proceed to evaluate
  113. the proposals considering, their relative values, e.g.
  114. - their assigned "astonishing factors",
  115. - their usability,
  116. - their impact on existing programs,
  117. - their technical feasability.
  118.  
  119. Best wishes,
  120.                     Otto Stolz <RZOTTO@DKNKURZ1.Bitnet>
  121.                                <RZOTTO@nyx.uni-konstanz.de>
  122.  
  123. ------
  124.  
  125. On Wed, 26 Aug 92 18:41:09 MEZ I said:
  126. > that all language features recognising words, or depending in other
  127. > ways on the meaning of white space, be identified, and that the
  128. > standard required consistent implementation of these features, e.g.
  129. > - tokenizing of the REXX source program, and of the the INTERPRET
  130. >   statement's operand [..],
  131. > - variables, and dots, in parsing templates,
  132. > - WORD, WORDINDEX, WORDPOS, SUBWORD, and WORDS, functions,
  133. > - STRIP [...], and SPACE, functions,
  134. > - weak character comparison (so-called "normal" comparative operators
  135. >   applied to non-decimal operands),
  136. > - padding default in COMPARE funktion [...],
  137. > - DATATYPE function,
  138. > - white space in operands of numeric operations (including functions)
  139. > (Warning: This list may not be exhaustive);
  140.