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: Eric's question
- Message-ID: <1992Aug30.151620.1@sejnet.sunet.se>
- Lines: 47
- Sender: news@sunic.sunet.se
- Reply-To: ERIC@SEARN.SUNET.SE
- Organization: SUNET, Stockholm, Sweden
- References: <ANDERS.92Aug29050537@lise3.lise.unit.no> <1992Aug29.163731.1@sejnet.sunet.se> <ANDERS.92Aug30131227@lise3.lise.unit.no>
- Date: Sun, 30 Aug 1992 15:16:20 GMT
-
- In article <ANDERS.92Aug30131227@lise3.lise.unit.no>, anders@lise3.lise.unit.no (Anders Christensen) writes:
- >> What a pathetic conclusion - "if you can't do it, it means you
- >> shouldn't do it this way, and not that something is wrong".
- >
- > Is this meant as a sort of quote from my posting?
-
- No, as a summary of the long description I had deleted to save space and which
- basically said that my error was to attempt to use the NAMES format on a unix
- machine and the solution was to use a format better suited to unix, and not to
- complain about the programming language.
-
- > 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. 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? Why not have
- '7F'x = 'FF'x on systems which are not 8-bits capable, too? And there are
- systems where '00'x stands for a placeholder, a character which doesn't exist
- and is skipped when reading the data. I suppose on such systems 'FFFFFF00'x
- should be equal to 'FFFFFF'x, and parse should happily skip over the nulls.
-
- > 2) You can solve this by adding regexps. But that might not be wise
- > since it also adds a lot of complexity. If you want to leave
- > regexps (and other extensions) out of it, then you have to write
- > more than one parse clause to do it.
-
- Let's face it, all you need is an expand() function. You don't need regexp, you
- don't need to change every single function and internal aspect of the language,
- you don't need to make assumptions about when the programmer wants TAB to be a
- word separator and the case where he was reading a makefile and wants TAB to be
- a TAB, you don't need to add OPTIONS qualifiers. 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. Then it is clear
- to all the REXX programmers on the planet what your program does, and there is
- no unexpected pitfall or anything like that.
-
- Eric
-