simple math equation

1. Join Date
Dec 1969
Posts
41

## simple math equation

I&#039;m trying to get one of three different files to include, and I think I&#039;m messing up the math.<BR><BR>dim topRight<BR><BR>if numvisits="" then<BR> topRight = "5525"<BR>elseif numvisits mod 3 = 0 then <BR> topRight = "4240"<BR>elseif numvisits mod 3 &#062; .5 then<BR> topRight = "5525"<BR>else<BR> topRight = "5125"<BR>End if<BR><BR>When it stops being evenly divisible by 3, it chokes.

2. Join Date
Dec 1969
Posts
41

## RE: simple math equation

Wait, I think I may have figured it out. Yep.

3. Senior Member
Join Date
Dec 1969
Posts
96,118

## Why is numvisits a string???

And MOD always produces an integer result.<BR><BR>But how will you *EVER* get a topRigh of "5125"???<BR><BR>Mathematically, it can&#039;t happen.<BR><BR>You are saying that code chokes when, for example, numvisits is 1??<BR><BR>(1 is not evenly divisible by 3)<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
•