<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Yadu and I discussed something similar (ie getting a separate return
code as well). I agree, that would be good.<br>
<br>
Mihael, is it possible for a built-in function to provide multiple
returns?<br>
<br>
How does one go about coding the built-in to behave
context-sensitively to its return values? (Eg, I think as does
readData?)<br>
(Thats more of a question for whoever codes this).<br>
<br>
Another question this raises is how one would write code that is
sensitive to a failing function. This leads to the need for an
exit() function that could shut down a swift run. And in the broader
context it leads to the need for exception handling.<br>
<br>
- Mike<br>
<br>
<div class="moz-cite-prefix">On 4/4/14, 10:58 PM, Ketan Maheshwari
wrote:<br>
</div>
<blockquote
cite="mid:CAMUuvioi7zWpdbGf7s9HbrWmMi=NjZstcYP-Zj8449vCoG1m1A@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<div dir="ltr">Is it possible to handle stdout and/or stderr of
system("command") separately? That way, it might be useful in
other places as well.</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Fri, Apr 4, 2014 at 12:08 PM, Yadu
Nand <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:yadudoc1729@gmail.com" target="_blank">yadudoc1729@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I have just added a new builtin "system" to trunk. It takes
a string,<br>
which is executed in the shell<br>
by java and the results are returned as an array. This is
done to make<br>
mappings easier, for example,<br>
you can map an entire folder "foo" using the following :<br>
<br>
file folder[ ] < array_mapper; files = system ("find foo
-type f") >;<br>
<br>
If the execution of the string provided fails, the logger
would report<br>
the the exitcode and stderr to<br>
the swift stdout.<br>
<br>
Thanks,<br>
Yadu Nand B<br>
_______________________________________________<br>
Swift-devel mailing list<br>
<a moz-do-not-send="true"
href="mailto:Swift-devel@ci.uchicago.edu">Swift-devel@ci.uchicago.edu</a><br>
<a moz-do-not-send="true"
href="https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel"
target="_blank">https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel</a><br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Swift-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Swift-devel@ci.uchicago.edu">Swift-devel@ci.uchicago.edu</a>
<a class="moz-txt-link-freetext" href="https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel">https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Michael Wilde
Mathematics and Computer Science Computation Institute
Argonne National Laboratory The University of Chicago
</pre>
</body>
</html>