[thelist] ASP 2.0 Functions
Chris Blessing
webguy at mail.rit.edu
Fri Jul 19 09:29:06 CDT 2002
Rob-
Round() is a valid ASP2 function, as is int() (and fix()) which will drop
the fractional part of a number (like floor). There is no ceiling()
function IIRC, but you can use JScript's functions from within your VB/ASP
block by doing something like:
<script runat=server langauge=JScript>
yourJSFunction(inVal){
return ceiling(inVal);
}
</script>
I currently use this setup for ordering arrays, since the VB bubble method
is pretty damn slow with larger chunks and JS has the built-in array.sort()
method.
Also note that round() can be rather unreliable sometimes, not always
rounding a particular number up as you would expect. I forget why this is
but there's some valid reason for it.
Check this out too:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbenlr98/ht
ml/vafctint.asp
HTH!
Chris Blessing
webguy at mail.rit.edu
http://www.330i.net
> Hi list,
>
> Is there anything remotely related to floor(), ceiling(), and/or round()
> functions in ASP 2.0
>
> Thanks,
> Rob.Smith
More information about the thelist
mailing list