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

Difference between action & Reusable action?

750


How to Open FireFox using descriptive programing? If my question is not clear, i will give an Example To Open Internet Explorer, We use Set IE = CreateObject(InternetExplorer.Application) IE.Navigate "www.yahoo.com In the same i need to open yahoo.com in firefox. Can any one tell me what is the server name of firefox to create an object

2620


how do u manipulating INI, DLL and / or registry files in support of your test environment? actually what do u mean by INI and DLL or registry files. plzzz its urgent do answer

1532


Could any one tell me "How can i recognize my cursor position using QTP 9.2" Give me a scripts for this

2161


How can I use Call dlls in QTP ?

1905






How will you check a web application for broken links using qtp?

643


Explain how you can find the absolute value of the number in qtp?

733


What are table and db checkpoints?

677


Hi All, I need code for how to execute qtp scripts from excell sheet

1544


Difference between test object and run time object?

671


what is the difference between built-i function and In-built function?

1729


How to integrate the qualitycenter with qtp

1861


Any body have QTP 9.5 licence key. please provide me at madhukar_dec30@yahoo.co.in

1682


What is the difference between keyword view and expert view?

704


How the exception handling can be done using quicktest professional?

635