[Swift-devel] problems with external dependencies

Ben Clifford benc at hawaga.org.uk
Mon Mar 23 02:26:54 CDT 2009


On Sun, 22 Mar 2009, Michael Wilde wrote:

> What statement can I use to "wait for the array to be closed before
> executing"?

At the moment, I think the only thing that will wait for an array to be 
closed is an app procedure taking that array as a parameter. When thats a 
file array, you will then get the file handling that you don't want.

However, its not clear from your example that you need it:

type file;

app (file o) echo (int i) { echo i stdout=@o; }

(external s, file r[]) generate() {                                              
  int j[] = [0:10];
  foreach i in j {
    r[i] = echo(i*i);
  }
}

app (file o) ls (string dir, external w) { ls "-l" dir stdout=@o; }

file datadir[]<simple_mapper;prefix="datadir/">;
external sync;
(sync,datadir) = generate();

file out <"ls.out">;
out = ls("/Users/benc/work/cog/modules/swift/datadir/", sync);

-- 




More information about the Swift-devel mailing list