#### Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

# C/Al Language (Navision Programming certif exam)

Member Posts: 191
edited 2004-12-02
Hi all... I really :oops: to ask this kind of question but... in all the documentation i have, I couldn't find the answer.. It is for the Navision Programming v. 3.70 exam..

Any one can give any short explanation about the DIV ?
What is MOD ? Is it C/AL or not ?
What are the "Logical" operators ?

Thanks a lot for your help...
My candle burns by both ends, it will not last the night,
But oh my foes and oh my friends, it gives a lovely light

## Comments

• Member Posts: 484
Does it help :-k
```a = (a DIV b) * b  + (a MOD b)
```

In C/AL language you can achieve:
```a DIV b: ROUND(a/b,1,'<');
a MOD b: ROUND((a/b - ROUND(a/b,1,'<')) * b,1);
```
®obi
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
• Member Posts: 484
Stop ](*,)

a DIV b gives the integer part of a/b
a MOD b gives the reminder when dividing a with b
```13 DIV 5 = 2
13 MOD 5 = 3
```

a,b and the result are integer. b>0.
®obi
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
• Member Posts: 191
Thanks a lot, it's very helpfull...
My candle burns by both ends, it will not last the night,
But oh my foes and oh my friends, it gives a lovely light
Sign In or Register to comment.