That's a bug in Basic, as far as I can see.
It doesn't matter if the divide is first. The result is still 1. AGKPascal gives the correct answer - AGKBasic doesn't.
Multiply first:
12 * 5 = 60
60 / 10 = 6
12 - 6 = 6
6 - 5 = 1
Divide first:
12 / 10 = 1.2
5 * 1.2 = 6
12 - 6 = 6
6 - 5 = 1
I can't see any way of rearranging the formula to yield 2.
Got it!
The constant literals MUST be in float notation:
value2# = 12.0-5.0*12.0/10.0-5.0
This produces the correct result. So this is a warning to make damned sure you stick .0 on the end of everything involving division if the result is to be correct.
So this is actually incorrect in the book. It's also an example of how Basics loose typing can trip you up.
-- Jim - When is there going to be a release?