X=10,Y=20 you need to swap the numbers without using a
third variable?

Answer Posted / ramyashetty

'a and b are two variables ; Following code swaps both number and string inputs

a = Inputbox("Enter a")
b = Inputbox("Enter b")


a = a + b

b = left(a,(instr(a,b)-1))
a = Right(a,(len(a)-len(b)))

msgbox "b ="&b
msgbox "a = "&a

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are private functions in QTP? How they can be called from the function library?

761


How will you handle java tree in qtp?

769


I hav installed QTP8.2, im working on webapplication, while running the script giving error msg like "QTPro.exe generated errors and will be closed by windows. You will restart the program. An error log is being created". Pls anybody what is the problem, what i have to do for this? Thanks...

1873


If created one virtual object? Next time I changed the window position will it work?

743


What are the technics follow in writing VB script?

1662






What is quicktest professional?

708


What are the types of object repository in qtp?

722


How does qtp identify gui object?

717


When to use shared and local object repository?

772


Will down time for server and content maintenance/upgrades be allowed? how much?

773


How do you do batch testing in wr & is it possible to do in qtp, if so explain?

778


On what document base Descriptive programming is written if build is not yet ready ?

1043


How does you pass optional arguments in qtp?

723


Hi, I got error message as "object does not support this property or method: "Test.Actions" when i execute the following line of script on QTP 9.0 Dim qtApp, qtRep Set qtApp = CreateObject("QuickTest.Application") Set qtRep = qtApp.Test.Actions("Action1").ObjectRepositories Can anyone tell me where i am wrong.

1715


Explain the types of properties that quick test learns while recording?

725