[Swift-user] how to change array index type
Ketan Maheshwari
ketan at mcs.anl.gov
Mon Nov 24 20:19:16 CST 2014
Hi,
I need to iterate over a float range between 0.1 and 1.0 with a step size
of 0.1.
My foreach loop looks like:
foreach i in [0.1:1.0:0.1]
{
/* == generate fdfs for different voltages == */
fdf_proc_vn[i]=gen_fdf(i,fdf_proc_v1);
}
I am getting the following error:
Supplied array index type (float) does not match the declared index type
(int)
How to declare/define array such that it can accept float index type?
Thanks,
Ketan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-user/attachments/20141125/94694796/attachment.html>
More information about the Swift-user
mailing list