How to covert a String to an integer?
Answers were Sorted based on User's Feedback
Answer / venkateshwarlu
using cint function
dim var1, var2
var1=10.89
var2=cint(var1)
msgbox var2
will give integer value : 10
| Is This Answer Correct ? | 11 Yes | 5 No |
Answer / vulani
Here's the shortest way to do it Gents:
string mystr ("1204");
int myint;
stringstream(mystr) >> myint;
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / varun bisaria
CInt()---> a conversion function available.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / bfakruddin
dim str,num
str="Hello"
num=100
cstr=cint(str) ' It converts string into integer
msgbox cstr
cint=cstr(num) ' It converts Integer into string
msgbox cint
| Is This Answer Correct ? | 8 Yes | 14 No |
Answer / raja83
you can use cint function
cint(10) will convert integer 1
| Is This Answer Correct ? | 4 Yes | 11 No |
Is it mandatory to know abt regular expression in descriptive programming
Write the vb script for the lowest and highest values of an array?
Can U Explain about QTP tool from older version to latest version also its differences?
what is object repository?
tell me abt a time when u had to go above &beyind the call of duty to get the job done
How to test background color and dynamic images which are moving during runtime?
What is our exact stage involvement with QTP?
How can we automate Capthca on registration or any contest forms ? Is it possile to Automate Webpages with Falsh using QTP..?
What is the maximum size of Object Repository in QTP 8.2?
what is run-time object in qtp? explain with example?
Where to use function or action?
In QTP what is the difference between Step-in, Step-out, Step-over ?