division of numbers in asp

# Thread: division of numbers in asp

1. Member
Join Date
Dec 1969
Posts
58

## division of numbers in asp

Hi<BR><BR>Im looking for the syntax for &#039;is divisible by&#039;, such that if <BR>x &#039;is divisible by&#039; 12 Then...<BR><BR>Thanks for the help

2. Senior Member
Join Date
Dec 1969
Posts
252

## RE: division of numbers in asp

If I understand correctly, the following should work:<BR><BR>if x / 12 = whatever Then<BR>do something<BR>end if<BR><BR>Martin

3. Member
Join Date
Dec 1969
Posts
58

## RE: division of numbers in asp

Hi Martin<BR><BR>Thanks for your help.<BR><BR>What I mean is that X/12 can be any number(12,24,36,48...) as long as the number is divisible by 12 (ie no remainder).<BR><BR>Do u know what I mean?<BR>

4. Senior Member
Join Date
Dec 1969
Posts
16,931

## Do you mean EXACTLY divisible by...

...?<BR><BR>I.e. when it&#039;s divided by it, there are no remainders?<BR><BR>If (x MOD y) = 0 then<BR> &#039; It IS.<BR>Else<BR> &#039; It isn&#039;t<BR>End If<BR><BR>Craig.

5. Senior Member
Join Date
Dec 1969
Posts
19,082

## to be pedantic....

.... you should have said : "Division of number in VBScript", since ASP is not a language, but a framework accessible to COM-compliant languages.<BR><BR>look up &#039;mod&#039; in VBScript. or &#039;%&#039; in JScript.

6. Senior Member
Join Date
Dec 1969
Posts
19,082

## and possibly....

.... having just arrived in the office drunk, I think maybe, on a tangent, way, way, over to the left, you&#039;re thinking about binary comparison? maybe? probably not. if not, ignore me.<BR><BR>drunken Atrax<BR>

7. Senior Member
Join Date
Dec 1969
Posts
16,931

## RE: and possibly....

You have those kinda thoughts when drunk?<BR><BR>Wow... :-)<BR><BR>Craig.

8. Senior Member
Join Date
Dec 1969
Posts
148

## And finally..

To be in a division, it needs to be numeric<BR><BR>eg<BR><BR>If isNumeric(x) AND x &#060;&#062; "" Then<BR> &#039; fun with numbers!<BR>End If

9. Senior Member
Join Date
Dec 1969
Posts
19,082

## RE: and possibly....

"there are only 10 kinds of people in the world.<BR><BR>those who understand binary, and those who don&#039;t"<BR><BR>woof woof woof. absolut is great, ad I saw my first &#039;in the flesh&#039; Damien Hirst work tonight so no-one else can possibly win.

10. Senior Member
Join Date
Dec 1969
Posts
19,082

## RE: And finally..

yeah, but VBScript does so much implicit conversion that most VBS developers don&#039;t know the difference.<BR><BR>venom<BR>venom<BR>venom<BR>and< BR>bile<BR><BR>j<BR>JScript user<BR>www.atrax.ws<BR><BR>

#### Posting Permissions

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