Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.3 . Guide To CA-Clipper - <b>%</b> http://www.X-Hacker.org [<<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

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson