Hi
Looks good!
Thanks very much
moshe
-----Original Message-----
From: Chamindu Ruwin Munasinghe [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 29, 2004 8:19 AM
To: 'Moshe Tapnack '
Subject: RE: [ASP] rounding integers
Hi
Use this ceil( number * 2) /2 . The ciel function gives you the nearest
integer greater than the given value. since vbscript doesnt have that here
is a workaround
Public Function Ceil(dValue)
Ceil = Int(dValue + 0.9999999999)
End Function
for this function to work make sure you dont use numbers with 10 decimal
places.
HTH
Chamindu
-----Original Message-----
From: Moshe Tapnack
To: asp4 (asp4)
Sent: 4/28/2004 11:08 PM
Subject: [ASP] rounding integers
hi gang
i'd like to round integers to the closest .5 or integer, ie: 3.4 would show:
3.5 and 3.8 would show: 4. i've tried with cInt and round() but as you all
know, that doesnt do the trick.
is there any built in funtion for this?
thanks!
Moshe
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor ---------------------~--> Buy
Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark Printer
at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/17folB/TM
---------------------------------------------------------------------~->
---------------------------------------------------------------------
Home : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
Post : [EMAIL PROTECTED]
Subscribe : [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
---------------------------------------------------------------------
Yahoo! Groups Links
---------------------------------------------------------------------
Home : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
Post : [EMAIL PROTECTED]
Subscribe : [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
---------------------------------------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/active-server-pages/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/