Cint() Function - TestingQ.com

-->Exclusive Portal for Testing Jobs

Cint() Function

CInt() - Convert to Integer Value
The CInt function converts an expression to type Integer.

Integer = CInt(Expression)
Returns Integer Number

Example1
a = "10"
msgbox typename(a)  'Output --> String

b = Cint(a)
msgbox typename(b)   'Output --> Integer

Example2 
a = "TestingQ"
b = Cint(a)
msgbox b   'Output --> Error

Note: The value must be a number between -32768 and 32767.

No comments:

Post a Comment