Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to return multiple values from function?
#1
Solved: 11 Years, 3 Months, 4 Weeks ago
Is it possible to return multiple values from function.


Thanks inadvace

Sandeep
Reply
#2
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi Sravsand,

Use Array if you want to return multiple values.
Reply
#3
Solved: 11 Years, 3 Months, 4 Weeks ago
Array is best way to return multiple values!
Reply
#4
Solved: 11 Years, 3 Months, 4 Weeks ago
As per the defination a Function can return only a single value.
But there are various ways by which you can make function look like effecting multiple variables.
1. Use of Array
2. "," or any seperator seperated string.
3. Pass a variable by ref to a function...
Reply
#5
Solved: 11 Years, 3 Months, 4 Weeks ago
you can use dictionaries as well
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Calling a function in a Test Script from a function library anupam4j 3 6,114 06-26-2015, 12:31 AM
Last Post: babu123
  Function return value is not passed during the 3rd iteration premanand1979 0 2,254 10-16-2014, 09:40 PM
Last Post: premanand1979
  Import multiple values from excel into QTP Shaik Ahmed 2 3,501 03-09-2014, 09:17 PM
Last Post: Shaik Ahmed
  getElementByid("myObhectId") return null??? qtptester 3 7,095 02-01-2013, 09:44 AM
Last Post: ravi.gajul
  QTP Test results will return exit codes asrivastava 13 17,018 07-08-2011, 12:57 PM
Last Post: rajpes

Forum Jump:


Users browsing this thread: 1 Guest(s)