home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / rexx / 809 < prev    next >
Encoding:
Text File  |  1992-08-27  |  8.9 KB  |  193 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Path: sparky!uunet!paladin.american.edu!auvm!DKNKURZ1.BITNET!RZOTTO
  3. Message-ID: <REXXLIST%92082721372076@DEARN>
  4. Newsgroups: comp.lang.rexx
  5. Date:         Thu, 27 Aug 1992 21:37:20 MET
  6. Sender:       REXX Programming discussion list <REXXLIST@UGA.BITNET>
  7. From:         Otto Stolz +49 7531 88 2645 <RZOTTO@DKNKURZ1.BITNET>
  8. Subject:      Re: Blanks, REXX, and portability...
  9. Lines: 182
  10.  
  11. On Wed, 26 Aug 92 18:10:54 PDT Dave Gomberg <GOMBERG@UCSFVM> said:
  12. > There may be a need to control print formatting, but the way to achieve
  13. > that is not the addition of the 127-to-an-emm space.  The way to do
  14. > that is PCL or PostScript or TeX or someother tool designed to solve
  15. > the problem.  You don't screw up the character set just to try to
  16. > control output.
  17.  
  18. I agree, wholeheartedly. I did not give that list of various spaces from
  19. ISO 10646 to imply that all of them must be used to control output; my
  20. point was that they are defined in the forthcoming Universal Character
  21. Code, which imho is bound to stay.
  22.  
  23. REXX will have to cope with major existing and forthcoming character
  24. codes, as characters are the stuff both REXX programs and REXX data are
  25. made of. Consequently, the REXX standard must be compatible with features
  26. these codes exhibit.
  27.  
  28. Particularly regarding space characters, the REXX standard must account
  29. for these properties:
  30. - there are character codes comprising several space characters,
  31. - some space characters are meant to separate words, other characters
  32.   are meant to form part of a word even if their visual representation
  33.   consists in absence of a graphic symbol,
  34. - some character codes comprise tab characters (and possibly other means)
  35.   to express the notions of either white space, or word boundaries, or
  36.   both.
  37.  
  38. TRL effectively uses the terms "blank", or "blank character", as a
  39. synonym for the notions of "word delimiter"; moreover, TRL tacidly
  40. assumes that there is only one sort of "blank" (aka "space") character
  41. in the underlying character code. (Cf. eg. the sub-section on "Parsing
  42. strings into words" of part 2 section 9, or the definition of the SPACE
  43. function in part 2 section 8 of the 1st edition -- sorry, I haven't the
  44. 2nd edition at hand.) Now we have seen that the tacid assumptions do not
  45. hold, we have to find the best compromise between the author's original
  46. intend, feasibility, usefulness, and adequacy (the notorious "least
  47. astonishing factor").
  48.  
  49. In such hermeneutic process, I came to the conclusion, that
  50.  
  51. 1. whenever the emphasis is on recognizing words (or tokens), REXX should
  52.    recognize (and treat interchangeably) all characters normally used
  53.    to delimit words
  54.  
  55.    (these are the language features I listed under "white space", the
  56.    other day),
  57.  
  58. 2. whenever a REXX construct is said to generate a single "blank" char-
  59.    acter, this should be interpreted as "one single character, that will
  60.    both act as a word-delimiter in any subsequent parsing operation and
  61.    appearing as white space on any subsequent output" -- and analogously
  62.    for constructs generating several "blank" characters
  63.  
  64.    (these are the language features I listed under "blank character", the
  65.    other day).
  66.  
  67. In the UCC (ISO 10646), the following characters will definitely serve
  68. as word-delimiters, hence would be covered by item 1, above:
  69.    Space
  70.    Ideographic space
  71. the following characters will never serve as word-delimiters, hence they
  72. shall be treated as ordinary (non-space) characters:
  73.    Non-breaking Space
  74.    Figure space
  75. I will have to read the final text of the standard to assess the other
  76. sorts of space and tabulator characters.
  77.  
  78. I am still proposing that the REXX standard should
  79. - distinguish between the notions of (word-delimiting) white space and
  80.   the blank character (generated by several language features),
  81. - exploit the new terms consistently, and throughout (cf. my checklists
  82.   of yesterday).
  83. Furthermore I suggest that the REXX standard should present, in an in-
  84. formative annex, examples (based on popular character codes) of space
  85. characters and non-space characters (cf. above).
  86.  
  87. On Wed, 26 Aug 92 20:54:12 EDT Scott Ophof <ophof@SERVER.UWINDSOR.CA>
  88. said:
  89. > But I still don't see any need for more than one character being a
  90. > blank, ie. the character that can always be used as separator of
  91. > words.
  92.  
  93. One crucial point is to distinguish analysing data from generating data.
  94. When REXX has to analyse data, the question is not whether one character
  95. *can* always be used, but rather whether it *will* always be used.
  96. Believe me: it won't :-(
  97.  
  98. Another, less obvious, point is, whether indeed one-and-the-same
  99. character will fit all word-delimiting situations. With universal
  100. character codes, such as ISO 10646, one size does *not* fit all!
  101. The reason is that ideographic scripts (Chinese, Korean, Japanese)
  102. require a different space character from letter, or syllable, based
  103. scripts.  I have not made up my mind what the REXX (or any programming
  104. language) standard should do regarding this intricacy.
  105.  
  106. On Wed, 26 Aug 92 20:54:12 EDT Scott Ophof said:
  107. > My concern is only for
  108. > portability *regardless* of system.  And on all those I know (of),
  109. > SPACE is the only character they all recognize as word delimiter.
  110.  
  111. Precisely to bring about the desired portability, REXX must act
  112. - as permissively as possible when analysing data, and
  113. - as predictably as possible when generating data.
  114. Your observation that SPACE is a (perhaps the) character all systems
  115. recognize does not guarantee portability of programs and data, if at
  116. least one system has additional means to delimit words! (We all know
  117. meanwhile that indeed these systems exist, even abound.)
  118.  
  119. On Thu, 27 Aug 92 06:30:35 LCL Anders Christensen said:
  120. > Someone posted earlier that CMS programmers often tend to regard the
  121. > format of data as very constant, e.g. that the interesting portion of
  122. > the output from command XXX starts in column 42, and is 8 characters
  123. > long. [...]
  124.  
  125. To guarantee that positional parsing templates, SUBSTRING functions,
  126. and the like, work as expected, the REXX standard should explicitely
  127. state:
  128.   Data passed directly from one REXX program to another REXX program will
  129.   be delivered unaltered; particularly, neither seemingly irrelevant
  130.   information (such as trailing white space) will be removed, nor any
  131.   form of data reduction (such as replacing sequences of blank characters
  132.   with tabulator characters) will take place.
  133.  
  134.   This rule will apply to the following situations:
  135.   - arguments passed to external REXX routines,
  136.   - results yielded by external REXX functions,
  137.   - data exchange via the external data queue,
  138.   - data exchange via persistent data streams.
  139.  
  140.   Note: any command sent to an external environment is subject to the
  141.   rules of that environment. Hence, when a REXX program sends a command
  142.   to cause the environment to invoke another REXX program with a
  143.   particular argument string, then the latter is subject to any data
  144.   transformations normally effected by that environment.
  145.  
  146. In article <9208270054.AA19196@SERVER.uwindsor.ca> Scott Ophof writes:
  147. > Hitting the TAB-key (etc.) eases the work of the typist.  OK.
  148. > But the data in the file should have the correct number of blanks.
  149. > At the application level programmers should *not* need to concern
  150. > themselves with the disposition of data in a (disk) file, as Dave
  151. > Gomberg implies.
  152.  
  153. Will REXX always be used at the application level? Do you want to pre-
  154. clude REXX being useed as a system programming language?
  155.  
  156. Digression:
  157.  
  158. On Wed, 26 Aug 1992 08:56:20 GMT Anders Christensen said:
  159. > [the character code in use] is sometimes hard to predict in advance,
  160. > and it might differ from machine to machine, and from login-session to
  161. > login-session.
  162.  
  163. On Wed, 26 Aug 92 20:54:12 EDT Scott Ophof said:
  164. > This is a tough byte to swallow...
  165.  
  166. Honestly, I am using a system of this sort. Even worse: the character
  167. code will change with every edit session you start! This is our attempt
  168. to cope with IBM's character code policy (can you say "un-policy"?):
  169. various system parts (printers, terminals, compilers, word processors,
  170. ...) implement differerent character codes. No official, IBM defined,
  171. I/O interface code matches the code expected by official, IBM supplied
  172. compilers (you can either buy a terminal that correctly enters the braces
  173. for the Pascal compiler, or the brackets, but not both). Hence, we
  174. invoke a character translation routine whenever the user starts editing
  175. a Pascal program, another one when he/she starts editing a TEX source,
  176. and so on.
  177.  
  178. This byte is so tough that SHARE Europe, the European IBM user's organi-
  179. sation, has been chewing it for 12 years.
  180.  
  181. End-of-digression.
  182.  
  183. On Wed, 26 Aug 1992 08:56:20 GMT Anders Christensen said:
  184. > Please, by all means, standardize what a blank is, but *please*, don't
  185. > standardize it in such a way, that it makes it impossible to use the a
  186. > true standard Rexx interpreter on some platforms.
  187.  
  188. Rather, standardize *how words are delimited*.
  189.  
  190. Best wishes,
  191.                     Otto Stolz <RZOTTO@DKNKURZ1.Bitnet>
  192.                                <RZOTTO@nyx.uni-konstanz.de>
  193.