home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!paladin.american.edu!auvm!DKNKURZ1.BITNET!RZOTTO
- X-Acknowledge-To: <RZOTTO@DKNKURZ1>
- Message-ID: <REXXLIST%92091111123047@DEARN>
- Newsgroups: comp.lang.rexx
- Date: Fri, 11 Sep 1992 10:46:51 MEZ
- Sender: REXX Programming discussion list <REXXLIST@UGA.BITNET>
- From: Otto Stolz <RZOTTO@DKNKURZ1.BITNET>
- Subject: Re: Blanks, REXX, and portability...
- In-Reply-To: Message of Thu,
- 10 Sep 92 15:52:07 GMT from <zjlc12@HOU.AMOCO.COM>
- Lines: 75
-
- Hi REXXer,
-
- on Thu, 10 Sep 92 15:52:07 GMT Jerry Campbell said:
-
- > [...] from a programmer's point of view I don't want anyone messing
- > with my data!! If there are tabs in the data, I want to see them!! I
- > want as much control over the data as I can get.
-
- When you want control over every character in your data, you will use
- character oriented operations, as
- - positional parsing,
- - literaL string, and variable (i.e. a variable in brackets), parsing,
- - the last variable in a row of variables and single periods,
- - character-position oriented, built-in, functions (such as SUBSTR),
- - strict comparison operators.
-
- When you want to give up control over every single character because you
- are only interested in numeric values, say, you will use decimal-numeric
- oriented operations, as
- - numeric operators,
- - numeric oriented functions (such as FORMAT),
- - non-strict (aka "normal", or "weak") comparison operators.
- None of these will discriminate among e.g. the following data values:
- "3.14159"
- " 3.14159 "
- ".0314159E2"
- "3141.59E-3"
- "+3.14159"
- "003.14159"
- "3.141590000"
- Though these operations ignore leading and trailing blanks, zeroes and
- plus-signs in particular places, and even interprete floating-point
- representations, nobody ever has complained that these are "messing
- with his or her data", have they?
-
- On the very same account, when you want to give up control over every
- single character because you are only interested in words, you will use
- word oriented operations, as
- - variables and single periods in a row (followed by a single
- period) in parsing templates,
- - word oriented functions (such as SPACE and SUBWORD),
- - non-strict (aka "normal", or "weak") comparison operators (with
- some care so they be not mistaken as numeric comparisons).
-
- Every program exploiting word-oriented operations will intrinsically
- give up controll over the exact number of blanks. What is so horrible
- about the idea of extending these operations, reasonably, to cover *all*
- instances of words the programmer would expect in a given environment?
- Nobody has ever proposed to take control away from the programmer!
- Everybody shall be free to apply the operations best suited to his or her
- problem -- even in REXX :-)
-
- > I'd want Parse to behave in a totally literal way, the same way I'd
- > expect the "strict" methods to behave. I can't believe anyone would
- > want to take a basic language element like Parse and make it behave
- > differently than other character oriented language elements. Parse
- > should not have an opsys fudge factor built in.
-
- This is in contrast to the agreed parts of the REXX definition. REXX
- has already word-oriented operations (including particular elements in
- parsing patterns, as outlined above and detailed in my previous poster)!
- PARSE is neither totally character oriented, nor totally word oriented:
- it depends on the pattern element you apply.
-
- Of course, this poster is by no means meant to point at a particular
- person. Jerry's remarks came just handy as an illustration of the --
- still prevailing -- misunderstanding. I hope, the above comparison with
- numeric operations may render the distinction between various types of
- REXX operations somewhat clearer, and may help to confine the discussion
- to the relevant point, viz. how word-oriented operations should be
- defined (not touching character-oriented operations, at all).
-
- Happy programming,
- Otto Stolz <RZOTTO@DKNKURZ1.Bitnet>
- <RZOTTO@nyx.uni-konstanz.de>
-