[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Issue with numerical keys with associative array.
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 19 Oct 2016 08:39:26 -0200
> As you can see, an entry for 11.21 exists but is not found.I suspect a (deep) rounding issue as the argument come from a calculation ... but is only a guess.
If the number comes from a calculation, then rounding is definitely a suspect,
especially if the result is 11.21.
I suggest you store the keys as strings instead of numbers, using something
like string.format("%.2f",x) to convert numbers to strings.