[Swift-devel] unitialized error when swift app returning a non-file type

Ketan Maheshwari ketancmaheshwari at gmail.com
Mon Apr 1 16:33:26 CDT 2013


Consider the following variant of above example:

type file;

app (file _b) s_app(string a){
 str_app a @_b;
}

file b[]<simple_mapper; location=".", prefix="b_",suffix=".out">;

foreach i in [0:10]{
   b[i]= s_app("hello");
}

And the corresponding bash script that app links to:

#!/bin/bash

echo "$1">$2

This variant exhibits the same pattern as the previous one except that b
now is a file type variable. The original example which did not work
involved b as a non-file type variable (string).

Since this one works, I understood the one with other types should also
work.



On Mon, Apr 1, 2013 at 4:23 PM, Mihael Hategan <hategan at mcs.anl.gov> wrote:

> On Mon, 2013-04-01 at 16:18 -0500, Ketan Maheshwari wrote:
> > To my understanding, it has to be used in the commandline so that Swift
> > knows where to put its value.
>
> I'm not sure what you mean there, or where you got that information, but
> when you say
>
> app ... {
>   appname x;
> }
>
> that means invoke 'appname' with the value of x as a parameter on the
> command line. There is no such value if x is a return parameter.
>
> Mihael
>
>
>


-- 
Ketan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-devel/attachments/20130401/d618b204/attachment.html>


More information about the Swift-devel mailing list