home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.rexx
- Path: sparky!uunet!wrkgrp!ets
- From: ets@wrkgrp.COM (Edward T Spire)
- Subject: Re: Capturing System Command Output (was: SH Backquote)
- Message-ID: <1992Aug20.142314.19261@wrkgrp.COM>
- Organization: The Workstation Group
- References: <REXXLIST%92081920591274@DEARN>
- Date: Thu, 20 Aug 92 14:23:14 GMT
- Lines: 55
-
- RZOTTO@DKNKURZ1.BITNET (Otto Stolz) writes:
- : 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!
-
- AREXX does contain some features that do not conform to Cowlishaw's
- rules. In some cases this is somewhat understandable, such as the
- issue we're discussing here, where Cowlishaw gave no guidance, and each
- implementer was forced to roll his own. In other areas (such as I/O)
- Bill Hawes simply did something he thought was better than what
- Cowlishaw had suggested. He may have been "right" about that, but it
- is causing some problems in the ANSI REXX efforts.
-
- ========================================================================
-
- Ed Spire email: ets@wrkgrp.com (on uunet)
- The Workstation Group voice: 800-228-0255
- 6300 River Road, Suite 700 or 708-696-4800
- Rosemont, Illinois 60018 fax: 708-696-2277
-