[Swift-devel] Foreach with floats

Mihael Hategan hategan at mcs.anl.gov
Tue Jul 17 13:59:02 CDT 2012


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