[Swift-devel] arrays of files

Michael Wilde wilde at mcs.anl.gov
Tue Nov 22 12:05:55 CST 2011


Yup, thanks, Mark - its a bug.

if you change the body of bar to read:

   ls "-lt" @filename(files[0]) @filename(files[1]) stdout=@result;

instead of:

  ls "-lt" @filenames(files) stdout=@result;

then it works.

I'll file a bugzilla ticket on this. David, can you add to the test suite? Mihael, can you fix it?

Thanks,

- Mike


----- Original Message -----
> From: "Mark Hereld" <hereld at mcs.anl.gov>
> To: "Michael Wilde" <wilde at mcs.anl.gov>
> Cc: "Thomas D. Uram" <turam at mcs.anl.gov>
> Sent: Tuesday, November 22, 2011 11:48:17 AM
> Subject: arrays of files
> Mike,
> 
> 
> this swift seems to compile without complaint but breaks down
> with a null pointer at the last line (invocation of "bar"). i think
> i'm
> confused about arrays of file objects. ideas?
> 
> 
> 
> 
> 
> 
> type file; app ( file result ) foo ( string args[] ) { ls "-lt" args
> stdout=@result; } app ( file result ) bar ( file files[] ) { ls "-lt"
> @filenames(files) stdout=@result; } file out <"dirlisting.txt">; out =
> foo([".",".."]); file out2 <"nother.txt">; out2 = foo(["/"]); file
> out3 <"proof.txt">; out3 = bar([out,out2]);
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -------------------------------------------------------
> Mark Hereld < hereld at mcs.anl.gov >
> Senior Fellow - Computation Institute
> Experimental Systems Engineer - Mathematics and Computer Science
> Visualization and Analysis Lead - Argonne Leadership Computing
> Facility
> Argonne National Laboratory
> The University of Chicago
> 
> 
> Cell: 630.327.2088
> Voice: 630.252.4170

-- 
Michael Wilde
Computation Institute, University of Chicago
Mathematics and Computer Science Division
Argonne National Laboratory




More information about the Swift-devel mailing list