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


Thanks inadvace

Sandeep
Reply
#2
Solved: 10 Years, 9 Months, 1 Week ago
Hi Sravsand,

Use Array if you want to return multiple values.
Reply
#3
Solved: 10 Years, 9 Months, 1 Week ago
Array is best way to return multiple values!
Reply
#4
Solved: 10 Years, 9 Months, 1 Week 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: 10 Years, 9 Months, 1 Week 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 5,908 06-26-2015, 12:31 AM
Last Post: babu123
  Function return value is not passed during the 3rd iteration premanand1979 0 2,056 10-16-2014, 09:40 PM
Last Post: premanand1979
  Import multiple values from excel into QTP Shaik Ahmed 2 3,260 03-09-2014, 09:17 PM
Last Post: Shaik Ahmed
  getElementByid("myObhectId") return null??? qtptester 3 6,740 02-01-2013, 09:44 AM
Last Post: ravi.gajul
  QTP Test results will return exit codes asrivastava 13 16,276 07-08-2011, 12:57 PM
Last Post: rajpes

Forum Jump:


Users browsing this thread: 1 Guest(s)