no it doesn't
yes it does... notice \ rather than /
( \ returns an integer only, which is what we want )

so:
5.2-(4.6*(5.2\4.6))
=> 5.2-(4.6*(1))
=> 5.2-(4.6)
=> 0.6 (usual floating point problem gives the extra dp's)

How does your alternative work if the numbers A and B are unknown and you want to find if A is and exact multiple of B?


if you mean the equivalent of:
If (A MOD B = 0) Then ...

that is:
If (A-(B*(A\B)) = 0) Then ...


this Mod in a function:
VB Code:
  1. Function MyMod(NumberA, NumberB)
  2.   MyMod = NumberA-(NumberB*(NumberA\NumberB))  
  3. End Function
  4.  
  5. 'usage:
  6. If MyMod(A,B) = 0 Then ...

admittedly you'll want to cut off the extra decimal places, but you get the idea