Promotic
WikipediaLinkedInYoutubeTwitterFacebook

CInt - function of language VBScript

Description:
Returns an expression that has been converted to type Integer.
Syntax:
CInt(expression As Variant) As Integer
Calling:
n = CInt(expression)
Parameters:
expression(Variant) Any valid expression.
Note:

The conversion functions can be used e.g. if you want some operation result to be expressed as a particular data type (rather than the default data type). For example, use CInt or CLng to force integer arithmetic in cases where single-precision, or double-precision arithmetic normally would occur.

Use the CInt function to provide internationally aware conversions from any other data type to an Integer type. For example, different decimal separators are properly recognized depending on the locale setting of your system, as are different thousand separators.

Example:
Dim nDouble, nInt
nDouble = 2345.5678
nInt = CInt(MyDouble) 'nInt contains 2346
nInt = CInt("2600") 'nInt contains 2600
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice