Navision Code Question

Any advice on programming the following in Cside: A= 7 B=9 C=3 B/c = D D = a whole number (3) a/c =D D <> = a whole number (2.33) If d >< whole number then Error (‘D is not valid’); Thanks

Are you just trying to figure out if the result is a whole number? If so, there are many ways you can do this… How about IF ((A/B) <> ROUND(A/B,1)) THEN ERROR(Text50000); Where Text50000 is ‘D is not valid.’ [;)]

… or IF (A MOD B) <> 0 THEN ERROR();

mod is better since it is much faster.

Seems to work fine thanks