How to swap two numbers by using parameter passing method
byref in a fucntion and return the result to outside of the
function?

Answer Posted / aqueeb khan lodi

call swap ("AQUEEB")
msgbox Environment("num")
Sub swap(str1)
var1 =len( str1)

For i = 1 To var1 Step 1
var2 = right(str1, 1)
var3 = left(str1,(var1 - i))
var4 = var4& " " &var2
str1 = var3
Next
Environment("num") = var4
End Sub

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between design time and run time data table?

687


How to associate shared object repository to test in qtp?

615


HI, pls help me on this, iam not able to capture getcelldata value in javatable... msgbox javawindow("").javatable("").getcelldata(3,3) but it diaplays empty...

2495


Hi frens! I am testing VB project with MS Access database. At add button click my record is storing in data table and it is shown in datagrid. So at Delete button click i want to check datagrid rows 9before and after delete). so how can i do it using descriptive programming?

1585


What is QTP scenario.

1817






I need to pull the data from the page which in row, column vice into excel sheet, how can it be done using QTP? eg: Name Dept xyz gdty i need the same data to be exported in excel sheet.

1811


How do you create new test sets in td?

609


Hi we are running tests remotely from quality center and pushing tests into qtp boxes remotely, and it does execution but while uploading results back into quality center it hangs in qtp box.If any one come across similar problem, please send me details how to handle this. Thanks kris

1829


What is checkpoint in qtp?

648


Hi this is chandra if any one have Navigation of LAB QTP, I want Navigation of those tools, if any one have the and know the Navigation each and every part of the QTP, plz send me my mail naruboinac@yahoo. com,naruboinas@ gmail.com

1535


Hi I have exp in manual testing and planning to move in automation testing qtp(9.2).So can help me how to automate customer relationship management tool using qtp and vb script this tool already developed so how can I test it whatever maintaining by development team like documents,various options just give the whole life cycle thanks in advance

1631


How to use actions in qtp ?

672


How to import a test case present in ".xls" file to TD under a Test set?

856


Is it possible to use two instances of UFT on the same machine? If not why?

709


Does QTP10 supports Windows 7OS +IE 9 combination? Which is the preffered combination ,Plz let me know?

3072