Chapter Contents

Previous

Next
MOD

MOD



Returns the remainder value

Category: Mathematical


Syntax
Arguments
Details
Examples

Syntax

MOD(argument-1,argument-2)

Arguments

argument-1
is numeric.

argument-2
is numeric.
Restriction: cannot be 0


Details

The MOD function returns the remainder when the integer quotient of argument-1 divided by argument-2 is calculated.


Examples

SAS Statement Results
x1=mod(6,3);
0
x2=mod(10,3);
1
x3=mod(11,3.5);
0.5
x4=mod(10,-3);
1


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.