home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / rexx / 756 < prev    next >
Encoding:
Text File  |  1992-08-20  |  2.6 KB  |  66 lines

  1. Newsgroups: comp.lang.rexx
  2. Path: sparky!uunet!wrkgrp!ets
  3. From: ets@wrkgrp.COM (Edward T Spire)
  4. Subject: Re: Capturing System Command Output (was: SH Backquote)
  5. Message-ID: <1992Aug20.142314.19261@wrkgrp.COM>
  6. Organization: The Workstation Group
  7. References: <REXXLIST%92081920591274@DEARN>
  8. Date: Thu, 20 Aug 92 14:23:14 GMT
  9. Lines: 55
  10.  
  11. RZOTTO@DKNKURZ1.BITNET (Otto Stolz) writes:
  12. : On Wed, 19 Aug 92 13:54:45 GMT Jean-Pierre Riviere said:
  13. : > Well, I am not a specialist but whatthe hell is the "RESULT" var done
  14. : > for ?
  15. : According to TRL (Section 14), and other sources, RESULT will always
  16. : hold the result of the REXX function finished most recently. Example:
  17. :      say time()
  18. : and
  19. :      call time
  20. :      say result
  21. : are semantically equivalent.  (Though my test run resulted in a dis-
  22. : crepancy in the least significant figures :-)
  23. : According to the same authoritative sources, the only variable affected
  24. : by a command to an external environment, is RC. It will hold the return
  25. : code of the command executed most recently.
  26. : In all operating systems I know of (admittedly not including Amiga), the
  27. : return code is a different concept from the standard output of a command.
  28. : Hence the current thread on how to grab the standard output *in addition
  29. : to the rc*.
  30. : > Would not be the better way be
  31. : > "ls -l ~"
  32. : > dir = result
  33. : Definitely not, as this would invalidate many existing REXX programs,
  34. : viz. programs that depend on the RESULT variable not being affected by
  35. : a command to an external environment.
  36. : > (This is the only available way to do it with arexx btw)
  37. : Hardly believable! If indeed so, Arexx would be grossly non-standard.
  38. : Please test your example, and report again.
  39. : > It's common rexx anf follows Cowlishaw's rules. (as far as I under-
  40. : > stood it...)
  41. : Definitely not (cf. supra). You'd better read Cowlishaw again!
  42.  
  43. AREXX does contain some features that do not conform to Cowlishaw's
  44. rules.  In some cases this is somewhat understandable, such as the
  45. issue we're discussing here, where Cowlishaw gave no guidance, and each
  46. implementer was forced to roll his own.  In other areas (such as I/O)
  47. Bill Hawes simply did something he thought was better than what
  48. Cowlishaw had suggested.  He may have been "right" about that, but it
  49. is causing some problems in the ANSI REXX efforts.
  50.  
  51. ========================================================================
  52.  
  53. Ed Spire                           email: ets@wrkgrp.com      (on uunet)
  54. The Workstation Group              voice: 800-228-0255
  55. 6300 River Road, Suite 700            or  708-696-4800
  56. Rosemont, Illinois  60018            fax: 708-696-2277
  57.