Micro Focus QTP (UFT) Forums
How to return multiple values from function? - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: How to return multiple values from function? (/Thread-How-to-return-multiple-values-from-function)



How to return multiple values from function? - sravsand - 03-07-2011

Is it possible to return multiple values from function.


Thanks inadvace

Sandeep


RE: How to return multiple values from function? - manishbhalshankar - 03-07-2011

Hi Sravsand,

Use Array if you want to return multiple values.


RE: How to return multiple values from function? - DinakarVadapalli - 03-07-2011

Array is best way to return multiple values!


RE: How to return multiple values from function? - rajeshwar - 03-07-2011

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...


RE: How to return multiple values from function? - aardvax - 03-08-2011

you can use dictionaries as well