home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.rexx
- Path: sparky!uunet!utcsri!torn!watserv2.uwaterloo.ca!watserv1!csg.uwaterloo.ca!giguere
- From: giguere@csg.uwaterloo.ca (Eric Giguere)
- Subject: Re: Capturing System Command Output (was: SH Backquote)
- Message-ID: <Bt90J6.B88@watserv1.uwaterloo.ca>
- Sender: news@watserv1.uwaterloo.ca
- Organization: Computer Systems Group, University of Waterloo
- References: <ANDERS.92Aug18223235@lise8.lise.unit.no> <1992Aug19.191542.16996@wrkgrp.COM>
- Date: Wed, 19 Aug 1992 20:49:53 GMT
- Lines: 35
-
- Just to muddle the discussion some more, it should be noted that ARexx (for
- the Amiga) extends the language by allowing external commands to return
- a result string instead of a return code. This behaviour works as follows:
-
- /* simple use of command results */
-
- option results /* used to turn on this behaviour */
-
- address myeditor
- 'openfile'
- filename = result
-
- The "option results" statement turns on the use of the result variable for
- result strings -- otherwise ARexx defaults to normal REXX behaviour. When
- an external command is issued, a flag is set in the message that is sent
- to indicate that a result string is requested _if possible_. If a result
- string makes sense, the application will set the RC field to 0 and
- return the string in the RESULT field. If RC is non-zero then the result
- string is ignored.
-
- Note that this is NOT the same as redirecting command output. This is
- just getting result string back from ARexx-aware applications. These
- applications can also use the variable pool interface to directly set
- variables in the application.
-
- But on the whole, a general approach still needs to be considered, and
- I'm not sure it should involve stacks and queues, which aren't necessarily
- defined in the host environment and may not make sense in a multitasking
- environment. And then you have to consider systems like Microsoft Windows
- which already have a messaging protocol in wide use -- shouldn't REXX
- use it as well?
-
- --
- Eric Giguere giguere@csg.UWaterloo.CA
- So is Windows NT short for "Windows, NOT?"
-