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