[thelist] ASP - if x = every nth?
Ross DeMeyere
ross.demeyere at gmail.com
Wed Jun 6 10:40:09 CDT 2007
On Jun 6, 2007, at 10:14 AM, Jon Hughes wrote:
> I have the following opening if statement:
>
> if i = 5 or i = 10 or i = 15 or i = 20 or i = 25 or i = 30 or i =
> 35 or
> i = 40 or i = 45 or i = 50 then
>
> It works, but it's not pretty, and not very versatile, if I have more
> than 54 items.
>
> Essentially, this performs and action on every 5th item (causes it to
> move to the next line down) - Is there any way to just say:
>
> If I = a product of 5
>
> ?
How about:
if (i mod 5) = 0 then
Ross DeMeyere
demeyere.com
More information about the thelist
mailing list