Groups | Blog | Home
all groups > inetserver asp general > december 2004 >

inetserver asp general : Increments by 10, 20, 30


someone
12/30/2004 3:16:57 AM
Hi All,

I need a function that only allows Increments by 10, 20, 30.....

How do I achieve this in VB Script?

Any help is appreciated.

TIA,

Santosh

Curt_C [MVP]
12/30/2004 8:04:31 AM
look at Mod()

--
Curt Christianson
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com


[quoted text, click to view]

Egbert Nierop (MVP for IIS)
12/30/2004 9:40:35 AM
[quoted text, click to view]

Public Function Inc10(inVal)
Inc10 = inVal + 10
End Function

Public Function Inc20(inVal)
Inc20 = inVal + 20
End Function

Public Function Inc30(inVal)
Inc30 = inVal + 30
End Function

--
compatible web farm Session replacement for Asp and Asp.Net
http://www.nieropwebconsult.nl/asp_session_manager.htm


[quoted text, click to view]
Evertjan.
12/30/2004 10:16:18 AM
someone wrote on 30 dec 2004 in microsoft.public.inetserver.asp.general:

[quoted text, click to view]

function myIncrBy(x,y)
if y=10 or y=20 or y=30 then x = x + y
myIncr = x
end function

--
Evertjan.
The Netherlands.
thorpe
12/31/2004 12:12:51 PM
if your going to use it with a 'for' loop you can use step.

example;

for i = 0 to 80 step 10
response.write(i) & "<br />"
next

[quoted text, click to view]

Lance Wynn
1/1/2005 9:56:56 PM
Also,

Function Increment(base, additive)
if additive mod 10 = 0 and additive > 0 then
increment = base+additive
end if
end function

might work...

[quoted text, click to view]
Hi All,

I need a function that only allows Increments by 10, 20, 30.....

How do I achieve this in VB Script?

Any help is appreciated.

TIA,

Santosh


AddThis Social Bookmark Button