[Swift-devel] multiple arguments

Mihael Hategan hategan at mcs.anl.gov
Fri May 4 10:25:54 CDT 2007


On Fri, 2007-05-04 at 14:48 +0000, Ben Clifford wrote:
> 
> On Fri, 4 May 2007, Ben Clifford wrote:
> 
> > > When it comes to files, the scheme was a little simpler. @filename would
> > > pass the file names of the fringe of a particular data tree. And
> > > @filenames would do the same, but each leaf is a single argument.
> > 
> > when used in an app block something like:
> > 
> >  app { 
> >    myapp "-in" @filenames(myarray[*]) "-type" "fast";
> >  }
> > 
> > then @filenames needs to be able to return something that gets passed to 
> > myapp as multiple parameters, rather than a single parameter with spaces 
> > in it.
> > 
> > I think (?) that this is hard to do if @filenames returns a single value, 
> > from a SwiftScript-theory perspective (though I think in the karajan 
> > implementation, @filenames can return as many values as it wants?)
> 
> so perhaps what we should say is
> 
> @filenames(myarray)
> 
> returns an array of strings (so  @filenames(myarray)  has type string[])
> 
> and then say that the behaviour for string arrays being used in an 
> application line is to make each element into its own argument.

Exactly.

> 




More information about the Swift-devel mailing list