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:
0 comments:
Post a Comment