Sponsored Ad

Tuesday, November 9, 2010

QTP: How to Interchange two Number without Temporary Variable

This QTP script will help you to swap two number with out using any third variable. In the given program we have two numbers and the first number have 100 and second number have 106. You can check in out put the numbers has been changed.

Swapping Numbers in QTP:

Dim A
Dim B 
A=100 
B=106 
A=A-B
B=A+B
A=B-A
msgbox "A: " & A & " B: " & B

Output of above program:

QTP: How to Interchange two Number without Temporary Variable

0 comments:

Post a Comment

Sponsored Ad

Development Updates

Tech Updates