[Swift-devel] arrays of files

Mark Hereld hereld at mcs.anl.gov
Tue Nov 22 13:07:32 CST 2011


thanks mike!   only interested in the array solution.  collecting
generic patterns that can be easily reused for wide number of
situations. gpsi.  -- mark

On Nov 22, 2011, at 12:05 PM, Michael Wilde wrote:

> 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
> 

-------------------------------------------------------
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






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


More information about the Swift-devel mailing list