[Swift-user] Using @arg function with arrays

Ben Clifford benc at hawaga.org.uk
Sun Jul 29 18:32:51 CDT 2007


On Sun, 22 Jul 2007, Luciano Piccoli wrote:

> I'm using the @arg function to get command line arguments into the swift script. That works well with single values. Is there support to get arrays as well? Something like the following:
> 
> > swift workflow.swift -confList=000102,000108,000114
> 
> > cat workflow.swift
>     ...
>     string confList[] = @arg("confList");
>     ...

I missed your message - sorry for the late reply.

I don't there's a way to do that in Swift at the moment. Something like 
that could be fairly straightforwardly implemented, I think. I'm slowly 
increasing the range of available string functions - something like the 
recently introduced @strcut function but that cuts a string into a an 
array of strings separated bya a supplied separator.

-- 



More information about the Swift-user mailing list