View Full Version : mod...what is it?
06 June 2003, 03:08 AM
can anybody tell me what this means:
x = 2
y = 5
if mod x y == 0 then
06 June 2003, 03:19 AM
mod is short for modulus and is the remainder in a division between two numbers.
So your code fragment will run the code in the if statement if x can be divided by y exactly with no leftover. Note that this is not the same as checking for x == y as x=15 and y=3 would work.
06 June 2003, 09:38 AM
01 January 2006, 08:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.