modulo

modulo definition - computer

A mathematical operation (modulus arithmetic) in which the result is the remainder of a division. Also known as the "remainder operator," it is used to solve a variety of problems. For example, the following code in the C language determines if a number is odd or even. The number in AMOUNT is divided by 2, and the result is the remainder. If RESULT is zero, the number is even. The % symbol is the modulo, or "modulus" operator.

      result = amount % 2;
      if (result == 0)
         EVEN=YES;
      else
         EVEN=NO;





Computer Desktop Encyclopedia THIS DEFINITION IS FOR PERSONAL USE ONLY
All other reproduction is strictly prohibited without permission from the publisher.
Copyright © 1981-2009 by Computer Language Company Inc. All rights reserved.

Comments
Improve this definition.
Do you have more to add? Share your linguistic knowledge or observation.
/Register to save your comments.