[Swift-user] two questions about Swift

Zhao Zhang zhaozhang at uchicago.edu
Wed Feb 3 00:36:25 CST 2010


Hi, Yi

There is a "Iter" in swift, which could work as a while statement. I am 
attaching an example.
And it is also in swift documentation. 
http://www.ci.uchicago.edu/swift/guides/tutorial.php#tutorial.iterate

Best
zhao

scipiter (scipin infile, scipopts settings)
{
 scipout ofile[] <ext; exec="mapout.sh", t=@infile>;
 scipin infilearray[]  <ext; exec="mapin.sh", t=@infile>;
 scipopts f <single_file_mapper;file="template">;
 //infilearray[0]=infile;
 iterate i {
     ofile[i]=scip(infilearray[i], settings);
     infilearray[i+1]=parser(ofile[i], f);
 }until(i==9);
}


Yi Zhu wrote:
> Hi all
>
> I have two questions about swift:
>
> 1. conventional loop:  In swift, we can use foreach to parallel apps, 
> but what If I just need a conventional loop, like a regular "for" or 
> "while" in java?
>
> 2.  In Matlab, there are some library which support some Math 
> functions like "sin" "cos" "reshape" etc. Is there any similar library 
> available for swift. If not, is there anyway to import external 
> library? (e.g. from Java)
>
> Many Thanks.
>
>
> -Yi
>
>
> _______________________________________________
> 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