MOD??

1. Senior Member
Join Date
Dec 1969
Posts
162

## MOD??

I know I should know this but I dont.<BR><BR>So what excatly does this do?<BR>Lets say count = 10<BR>if count mod 2 = 0 then<BR><BR>Do something....<BR><BR>End if

2. Senior Member
Join Date
Dec 1969
Posts
1,274

## Modulous <eop>

It returns the remainder of a division<BR><BR>http://www.devguru.com/technologies/vbscript/quickref/mod.html

3. Senior Member
Join Date
Dec 1969
Posts
862

## RE: MOD??

it acts like a &#039;step 2&#039; and skips all odd numbers.

4. Senior Member
Join Date
Dec 1969
Posts
2,334

## RE: Zero

10 MOD 2 = 0<BR><BR>Number1 MOD Number2<BR>It is the remainder of Number1 divided by Number2

5. Senior Member
Join Date
Dec 1969
Posts
162

## RE: MOD??

Just read what Mod does.<BR><BR>So<BR><BR>If Count is 10<BR><BR>Count Mod 2 = 0 <BR>The remainder is 0 right?<BR>So we are loking at the remainders of the Division by 2 correct?<BR>

6. Senior Member
Join Date
Dec 1969
Posts
162

## RE: MOD??

Yep thats what the code is doing Tks

7. Senior Member
Join Date
Dec 1969
Posts
862

## ...when used in loop

.<BR><BR>i&#039;ll be more specific:<BR><BR>when used in a loop, it executes the block only if count mod 2 = 0, ie if count is an even number.

8. Senior Member
Join Date
Dec 1969
Posts
862

## had a feeling that's what you wanted

.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•