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

  1. Newsgroups: comp.lang.rexx
  2. Path: sparky!uunet!mcsun!sunic!sejnet.sunet.se!eric
  3. From: eric@sejnet.sunet.se (Eric Thomas)
  4. Subject: Re: Blanks, REXX, and portability...
  5. Message-ID: <1992Aug27.175521.1@sejnet.sunet.se>
  6. Lines: 31
  7. Sender: news@sunic.sunet.se
  8. Reply-To: ERIC@SEARN.SUNET.SE
  9. Organization: SUNET, Stockholm, Sweden
  10. References: <9208270054.AA19196@SERVER.uwindsor.ca> <ANDERS.92Aug27063035@lise3.lise.unit.no>
  11. Date: Thu, 27 Aug 1992 17:55:21 GMT
  12.  
  13. In article <ANDERS.92Aug27063035@lise3.lise.unit.no>, anders@lise3.lise.unit.no (Anders Christensen) writes:
  14. > When taking from an ASCII to an EBCDIC system (or vice versa), you
  15. > _must_ translate the contents. The clue it that *you* don't parse on
  16. > Tab, the *computer* (i.e. the rexx interpreter) parses on Tab,
  17. > depending on the common customs of the host operating system. So
  18. > instead of forcing you, as a user to have to take care of the Tabs,
  19. > the computer (i.e. the Rexx interpreter) should handle it. The
  20. > interpreter can only do that if it knows what is whitespace and what
  21. > is not whitespace for your particular system.
  22.  
  23. Ok, time for the usual stupid question. Say I have a program that does:
  24.  
  25.                   Parse var line ':'tagname'.'value' :'line
  26.  
  27. Say I run that program on an ASCII system which recognize the 20-odd types of
  28. blanks Otto showed in his posting. Where does my 'value' variable end, when the
  29. interpreter encounters a SPACE followed by colon (ancient, despicable, evil
  30. EBCDIC-type behaviour, surely that must not be the case), or also when it
  31. encounters TAB followed by colon (nice, modern ASCII-type behaviour which
  32. happens to break the program because that is not what the programmer wanted
  33. and thought the interpreter would do).
  34.  
  35. In either case you have a problem. If the blank in the search string only
  36. stands for SPACE, it is very difficult to indicate that you want any of the 20+
  37. white space characters to match. You would almost need a new WSPARSE command,
  38. and WSPOS, and so on. If on the other hand the blank stands for any white space
  39. character, you have no way in the language to halt on just a SPACE when you
  40. need to do that. OPTIONS is not a solution, a given program may well need both
  41. functions very often and switching OPTIONS statements is at best impractical.
  42.  
  43.   Eric
  44.