[INUG-Users] mod function in Rules
Alex Greenbank
agreenbank at uk.ibm.com
Wed Jan 6 15:40:08 EST 2010
Hello,
users-bounces at netcoolusers.org wrote on 06/01/2010 19:51:14:
> Hi All,
>
> Do we have "mod" function in rules files? just like C or perl which uses
"%"
> operator for mod function.
No, there's no specific mod operator.
> I searched the Rules documents but couldn't find the answer.
>
> I appreciate all the responses.
But there is a workaround:-
$n = 47
$mod = 5
$rem = int( $n ) - ( int( int($n) / int( $mod ) ) * int( $mod ) )
Ta,
-Alex
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
More information about the Users
mailing list