hi,
i was adding the two numbers in qtp scripts but i didn't get
the answer. see my below script, i dont know wht is the problem.

i passed the value a=3 b= 2, i got the ans 32 instead of 5.
i thing the problem is to be c = a+b

my mail id karthis4u@gmail.com

Dim a, b, c
a = inputbox("enter the a ")
b = inputbox("enter the b ")
c = a + b
print c

Answer Posted / deepak singh

hi

Use CINT Function:: correct code is

Dim a, b, c
a =cint( inputbox("enter the a "))
b =cint( inputbox("enter the b "))
c = a + b
msgbox c


send mail if you have any query:

ccna_deepak@yahoo.com

Is This Answer Correct ?    21 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is quicktest professional (qtp window?

778


What is keyword view?

772


How many add-ins comes by default with quicktest professional?

716


hi in real time who will execute the qtp test scripts? my faculty said, in a companty automation testers are written the test scripts and manual testers are execute the test scripts...IS IT RIGHT OR NOT?

3183


how can we preform retesting(DATA driven test) using function please gine the code for loginpage

2479


What are the different properties of an web object

1614


in my application,validation message has in japanise language.how to validate this message is appears properly or not

1741


After fixing the bug, the same bug is raising again and again in new builds what we have to do? That bug is high level bug.

6638


i have doubt suppose iam purly working in QTP, when i will work on sql and performence testing? pls any one clarify doubt?

1715


What is the syntax to call one script from another?

760


How to start recording using quicktest professional?

828


Have you used xml check point in your project? How?

731


Could you please any one give code for the following ? Scenario : Suppose a excel file contains 10 records and earch have 5 fields. how can i input this excel file for datadrive wizard ? Please explain

1695


Have you faced any problems with object repository?

791


Where to use function or action?

847