[Swift-user] suggestion for program flow control

Mihael Hategan hategan at mcs.anl.gov
Wed Jun 11 17:09:16 CDT 2008


> > 
> > Why is it that you don't want to pass a result file for
> > each of the
> > thousand processed files?
> 
> laziness, 

Fair enough an argument for me.

> 
> and also I'm not sure what that should look like in the function definition? 
> 
> Is there a way I can make the argument list for the function dynamic since the number of result files will vary based on the selected database to process?

If I understand this correctly, then you can pass the whole array. You'd
get each file name on the command line. There's a question of whether
you'd cross the command line length limitation.

We should have array slices in Swift maybe?

> 
> I can definitely see the benefit of having separate pipelines for non-dependent parts within the same script, but perhaps there is a way to chain dependent functions that is not dependent on files produced by previous functions? 

Only that it is, but Swift has no idea about it. The dependency is
handled/created by your script.

> 
> Like I said it wasn't a big deal to add the extra script to pause and count files, just different behavior than I expected from the loop code.

Right. If you look at it through the prism of an intuition constructed
by doing C and Java and the likes, it doesn't look right.

> 
> > 
> > > 
> > > Mike
> > > 
> > > 
> > >       
> > > _______________________________________________
> > > Swift-user mailing list
> > > Swift-user at ci.uchicago.edu
> > >
> > http://mail.ci.uchicago.edu/mailman/listinfo/swift-user
> > 
> > _______________________________________________
> > Swift-user mailing list
> > Swift-user at ci.uchicago.edu
> > http://mail.ci.uchicago.edu/mailman/listinfo/swift-user
> 
> 
>       




More information about the Swift-user mailing list