Int Math / Numeric Function

Int Math / Numeric Function
Don't confuse Int with cInt! cInt turns a text variable into a numeric variable. Int takes a number and chops off any decimal points, turning it into a whole number.

So say you have a value that is

PercRight = 89.285728

but you want to show a simple "89%" to your end user. You would say

PercRight = Int(PercRight)
response.write PercRight & "%"

and that would chop it down to just the 89 part of the number.

ASP Math and Number Functions

Introduction to ASP Ebook

Download this ebook to get everything you need to know about learning ASP - from a step by step tutorial to function lists, sample code, common errors and solutions, and much more! 101 pages.




RSS
Editor's Picks Articles
Top Ten Articles
Previous Features
Site Map





Content copyright © 2023 by Lisa Shea. All rights reserved.
This content was written by Lisa Shea. If you wish to use this content in any manner, you need written permission. Contact Lisa Shea for details.