Quick References
ADO
ASP
CSS2
HTML
JavaScript
Jet SQL
VBScript
WML
WMLScript
WSH
XHTML
XML DOM
XSLT
Features
Knowledge Base
Tutorials
Partners
ZVON.ORG
XML
Planet Source Code
VisualBuilder
Web Design
Your HTML Source
XML/XSLT Forums
ASPAlliance
Scripts
Programmers Heaven
Tek-Tips Forums
Developer Fusion
Code Project
All Functions
CInt Function
Round Function
FUNCTION: Int( )
Implemented in version 1.0
Int
(Number)
The
Int
function converts a decimal number (floating-point) to an integer number (fix-point).
There is one major difference between
Int
and
Fix
.
Int
rounds negative numbers down.
Fix
rounds negative numbers up.
Code:
<% =Int(123.456) %>
Output:
123
Positive numbers are not rounded up. The decimal point and all digits to the right are effectively chopped off.
Code:
<% =Int(123.899) %>
Output:
123
Negative numbers are rounded down (towards more negative).
Code:
<% =Int(-123.456) %>
Output:
-124
Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information