home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!mips!darwin.sura.net!paladin.american.edu!auvm!DKNKURZ1.BITNET!RZOTTO
- X-Acknowledge-To: <RZOTTO@DKNKURZ1>
- Message-ID: <REXXLIST%92081920591274@DEARN>
- Newsgroups: comp.lang.rexx
- Date: Wed, 19 Aug 1992 20:22:03 MEZ
- Sender: REXX Programming discussion list <REXXLIST@UGA.BITNET>
- From: Otto Stolz <RZOTTO@DKNKURZ1.BITNET>
- Subject: Re: Capturing System Command Output (was: SH Backquote)
- In-Reply-To: Message of Wed, 19 Aug 92 13:54:45 GMT from <jpr@HP10.LRI.FR>
- Lines: 59
-
- On Wed, 19 Aug 92 13:54:45 GMT Jean-Pierre Riviere said:
- > Well, I am not a specialist but whatthe hell is the "RESULT" var done
- > for ?
-
- According to TRL (Section 14), and other sources, RESULT will always
- hold the result of the REXX function finished most recently. Example:
- say time()
- and
- call time
- say result
- are semantically equivalent. (Though my test run resulted in a dis-
- crepancy in the least significant figures :-)
-
- According to the same authoritative sources, the only variable affected
- by a command to an external environment, is RC. It will hold the return
- code of the command executed most recently.
-
- In all operating systems I know of (admittedly not including Amiga), the
- return code is a different concept from the standard output of a command.
- Hence the current thread on how to grab the standard output *in addition
- to the rc*.
-
- > Would not be the better way be
- > "ls -l ~"
- > dir = result
-
- Definitely not, as this would invalidate many existing REXX programs,
- viz. programs that depend on the RESULT variable not being affected by
- a command to an external environment.
-
- > (This is the only available way to do it with arexx btw)
-
- Hardly believable! If indeed so, Arexx would be grossly non-standard.
- Please test your example, and report again.
-
- > It's common rexx anf follows Cowlishaw's rules. (as far as I under-
- > stood it...)
-
- Definitely not (cf. supra). You'd better read Cowlishaw again!
-
- > So why are you trying to implement hassles with
- > dir = "ls -l ~"
- > and all its derivative ?
-
- Nobody has proposed this variant, for the simple reason that it
- already has a meaning in REXX, quite different from what you seem to
- expect, viz. set the variable DIR to the value "ls -l ~".
-
- > Cannot the result way be good enough for us ?
-
- Apparently not, for reasons given above.
-
- > Just a reflexion from a rexx user. Nothing else.
-
- Francly, I wouldn't call it a reflexion ...
-
- Best wishes,
- Otto Stolz <RZOTTO@DKNKURZ1.Bitnet>
- <RZOTTO@nyx.uni-konstanz.de>
-