home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!decwrl!contessa!mwm
- From: mwm@contessa.palo-alto.ca.us (Mike Meyer)
- Subject: Re: Blanks, REXX, and portability...
- Newsgroups: comp.lang.rexx
- Distribution: world
- References: <9208270054.AA19196@SERVER.uwindsor.ca> <ANDERS.92Aug27063035@lise3.lise.unit.no> <1992Aug27.175521.1@sejnet.sunet.se>
- X-NewsSoftware: Amiga Yarn 3.4, 1992/08/12 15:49:52
- Keywords:
- Summary:
- Message-ID: <mwm.1pdx@contessa.palo-alto.ca.us>
- Date: 30 Aug 92 16:35:41 PST
- Organization: Missionaria Phonibalonica
- Lines: 47
-
- In <1992Aug27.175521.1@sejnet.sunet.se>, eric@sejnet.sunet.se (Eric Thomas) wrote:
- > 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).
-
- What you want it to be is whatever whoever generated the input thought
- it would be. In the case that I run into most, that's easy. I'm
- dealing with data that follows Internet Request For Comment #822,
- which says:
-
- 3.4.2. WHITE SPACE
-
- Note: In structured field bodies, multiple linear space ASCII
- characters (namely HTABs and SPACEs) are treated as
- single spaces and may freely surround any symbol. In
- all header fields, the only place in which at least one
- LWSP-char is REQUIRED is at the beginning of continua-
- tion lines in a folded field.
-
- I.e. - I have to accept both space and tab as space, because the
- standards document I'm using _says_ I 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.
-
- How many cases have you run into that need both behaviors (nuts, how
- many have you run into other than the one you normally deal with)? The
- only ones I've met were that way because the input data stream allowed
- used TABs as whitespace, but the output streams didn't. That case
- doesn't require changing modes in midstream, it just means you can't
- generate TABs. No problem.
-
- <mike
-
-