[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
%
Modulus--binary (Mathematical)
------------------------------------------------------------------------------
Syntax
<nNumber1> % <nNumber2>
Type
Numeric
Operands
<nNumber1> is the dividend of the division operation.
<nNumber2> is the divisor of the division operation.
Description
% returns a number representing the remainder of <nNumber1> divided by
<nNumber2>.
Notes
. Seeking the modulus of any dividend using a zero as the
divisor causes a runtime error. In versions of CA-Clipper prior to
Summer '87, a modulus operation with a zero divisor returned zero.
Examples
. This example shows modulus results using different operands:
? 3 % 0 // Result: Runtime error
? 3 % -2 // Result: 1
? -3 % 2 // Result: -1
? -3 % 0 // Result: Runtime error
? -1 % 3 // Result: -1
? -2 % 3 // Result: -2
? 2 % -3 // Result: 2
? 1 % -3 // Result: 1
See Also:
*
**
+
-
/
= (compound)
MOD()*
SET FIXED
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson