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: Re: Blanks, REXX, and portability...
- Message-ID: <1992Sep6.022654.1@sejnet.sunet.se>
- Lines: 37
- Sender: news@sunic.sunet.se
- Reply-To: ERIC@SEARN.SUNET.SE
- Organization: SUNET, Stockholm, Sweden
- References: <9209051944.AA18020@lns598.TN.CORNELL.EDU>
- Date: Sun, 6 Sep 1992 02:26:54 GMT
-
- In article <9209051944.AA18020@lns598.TN.CORNELL.EDU>, cultural elite <dsr@LNS598.TN.CORNELL.EDU> writes:
- > I agree, that would be ridiculous. Not even Unix (with the possible exception
- > of a few broken utilities) behaves that way.
-
- With the possible exception of, for instance, scanf(), the C formatted read
- routine. Ever tried to use scanf() to read a one-word reply from the terminal,
- and use a default value if the user just hits RETURN? scanf() insists that all
- these carriage returns are just white space which should be happily ignored,
- and the user wonders what is going on - the more he hits RETURN, the more
- nothing happens. Yes, I know, there are ways out, but the least you can say is
- that they are unintuitive...
-
- > Mike's question was specifically about word separators, which
- > I take to mean the behavior of parse when no explicitly quoted separators are
- > given, and the behavior of word() and words() and a few other intrinsics.
- > Accepting any whitespace as word separators would have no effect on your
- > example, or any other involving explicitly quoted blanks. Where is the problem
- > with that?
-
- The problem is that if you want to change the language definition of all these
- functions, you have to come up with a solution that is clearly defined and
- works for all systems, not just unix. One such solution, which is what I
- understood all the previous postings were proposing, is that positional PARSE
- et al are to treat any character for which isspace() returns TRUE as white
- space.
-
- Under VM, isspace() is true for X'05' and X'15'. It is logical for isspace() to
- be true for these characters, since they are the EBCDIC equivalents of TAB and
- CRLF, respectively; as far as I know, all the C compilers for VM agree on this.
- I'm not really eager to find out what happens to my tens of thousands of lines
- of code the day X'15' is suddenly treated as a blank. It is used as a
- line-separator in functions like DIAG, and it is common programming practice to
- use it as a line separator when returning more than one line of (non-binary)
- data from a function. I suppose a similar situation exists for \n on unix
- systems, but I've never used REXX on unix so I wouldn't know.
-
- Eric
-