From: anders@lise3.lise.unit.no (Anders Christensen)
Subject: Re: Eric's question
Organization: University of Trondheim, Norway
	<ANDERS.92Aug30131227@lise3.lise.unit.no>
	<1992Aug30.151620.1@sejnet.sunet.se>
Date: 31 Aug 92 14:49:33

In article <1992Aug30.151620.1@sejnet.sunet.se> eric@sejnet.sunet.se (Eric Thomas) writes:
> In article <ANDERS.92Aug30131227@lise3.lise.unit.no>, anders@lise3.lise.unit.no (Anders Christensen) writes:

> >   1) Parsing with a literal pattern containing a Space character, is
> >      not the same as parsing words delimited by whitespace into
> >      variables and placeholders.
> > 
> >      The latter will (normally) match a non-empty, non-leading series
> >      of 'blanks', with one 'word-delimiter' in the template. Suppose
> >      your operating system normally considers words to be separated by
> >      not one single character, but any from a class of characters.
> >      Then it seems natural to me that implementations of Rexx under
> >      that operating system should recognize all characters in that
> >      class as possible word-delimiting whitespace.

> What nonsense. 

Are you really suggesting that it is nonsense for a Rexx interpreter
to follow the conventions of the computer it is running on?

>                VMS generally considers TRUE and YES as synonyms for 1, and
> NO/FALSE stand for 0. Then it seems natural that any implementation of REXX
> under VMS should recognize these values as valid booleans, right? 

No. You are confusing the meaning of characters within a character set,
with the how to interpret text written with that character set.

In most cases, Rexx does not care about what the values of characters
are. But in some cases, it does matter. These situations include
finding word-delimiting sequences of characters the parse clause and in
built-in functions like WORD(), WORDPOS() etc. It also includes (on
some systems) converting end-of-line characters and end-of-file
characters between their representation and their meaning. 

> Let's face it, all you need is an expand() function. 

No, TRANSLATE() performs that operation perfectly, as long as you are
only interested in the whitespaceness of the character, not to
tranlate it into the right number of spaces.

Also note that this is not just a question about Space and Tab, even
though they are the characters focused on in this debate. In TRL 2nd
edition, this question is somewhat not covered. If there is no
agreement on this problem, then it is best to let it continue to be
unspecified.

>                                                        You don't need
> regexp, you don't need to change [...]

"need" and "need" are two different things. If you are taking a
minimalist view, you don't "need" DO-loops, since it is very simple to
substitute them with SIGNAL and IF clauses. That you can do without a
thing, does not mean that you should.

>                                 All you need is to expand the stupid
> tabs whenever you want them to stand for blanks, ie after acquiring
> text data from an external source like a file or a system command.

Great! Then on a Unix system, you have to use two parse clauses
whenever you want to pull something off the stack and parse it into
words. One to pull it off the stack so it can be expanded, and then
one to parse it into the variables. 

-anders
Newsgroups: comp.lang.rexx