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


Thanks inadvace

Sandeep
Reply
#2
Hi Sravsand,

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

Forum Jump:


Users browsing this thread: 1 Guest(s)