[Swift-devel] Foreach with floats

David Kelly davidk at ci.uchicago.edu
Tue Jul 17 14:06:18 CDT 2012


Great, thanks! I'll make a note to add an example like that to the user guide - that seems pretty useful.

David

----- Original Message -----
> From: "Mihael Hategan" <hategan at mcs.anl.gov>
> To: "David Kelly" <davidk at ci.uchicago.edu>
> Cc: swift-devel at ci.uchicago.edu
> Sent: Tuesday, July 17, 2012 1:59:02 PM
> Subject: Re: [Swift-devel] Foreach with floats
> On Tue, 2012-07-17 at 11:57 -0700, Mihael Hategan wrote:
> > Theoretically this should work:
> >
> > foreach i in [0.0:10:0.2] {
> > }
> >
> > (i.e. the first thing is a float and you specify a step).
> >
> > But I seem to be getting an error when I try it.
> 
> nevermind. They all need to be floats:
> 
> foreach i in [0.0:10.0:0.2] {
> }



More information about the Swift-devel mailing list