Syntax:-CInt(Number)
The CInt function will converts any number to the variant of subtype Integer.
Converts to values ranging from -32,768 to 32,767 The number is rounded off.
Code:
a=1555.567
Cint(a)
Output:
1556
And mostly where we will use . Some time when we get the value from our application, there is the chance to be an variable .
Example recently I get the value from one label ,its look like integer (E.g 8) but its displayed as variable . so in this situation we need to convert it from variable to integer.
Why we need to change it as integer.
if we need to compare the value to any integer surly we need to convert it before as an integer.
The CInt function will converts any number to the variant of subtype Integer.
Converts to values ranging from -32,768 to 32,767 The number is rounded off.
Code:
a=1555.567
Cint(a)
Output:
1556
And mostly where we will use . Some time when we get the value from our application, there is the chance to be an variable .
Example recently I get the value from one label ,its look like integer (E.g 8) but its displayed as variable . so in this situation we need to convert it from variable to integer.
Why we need to change it as integer.
if we need to compare the value to any integer surly we need to convert it before as an integer.
No comments:
Post a Comment