Re: FN-FORUM: ASP Maths Problem!
date posted 1st February 2008 13:08
On Friday 01 February 2008 14:44:28 Graham Stark wrote:
> On Fri, 2008-02-01 at 12:29 +0000, Dom Latter wrote:
> > So intTotal * 47/200 will do nicely.
>
> This could give you 0 depending on the order of evaluation - whether
> your compiler sees this as (intTotal*47)/200 or intTotal*(47/200). The
> former is more usual, though.
In real code I would make it explicit by using parentheses. But if
the language leaves the order of evaluation undefined or does it
right to left, then I'm not using that language if I can possibly help
it.