can a Function return more than one value..??? if so please
give me the code for that.

Answer Posted / nath t

Function doesn't return more than one value.

if you want to get more than one result, we can write
function for that. After u will get the value u have to
split the value.

Example:

Function AddSub(a, b)
som = a + b
subt = a - b
AddSub = som&"/"&subt
End Function

this function returns only one value. But it's having two
results(i.e Addition and subtraction of two no.s).

After u will get this value. u have to split that one for
two results by using split function here delimeter is "/".

like this we can add more than one result to the return
variable(in this example AddSub is the return variable).

Is This Answer Correct ?    2 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In an interview, what r the general questions asked in QTP? pls give me anwser to this question?

1415


Explain different types of action in qtp?

568


Difference between test object and run time object?

586


if anyone has idea of the interview procedure in covansys, plz send me a mail?

1521


Hybrid framework supports Descriptive programming. Is it true?

643






Hi, I'm a beginner in QTP and planning of a certification in QTP, but have no idea about it :P. Could anyone please tell me what certifications that a QTP- beginner can take? What is the fees and the syllabus for the certification? Please reply soon. Thanks Vidhya

1415


Hi Friends... By using QTP , can we test .net products...and that product supports different languages.. thanx in advance..

4126


what you mean by artifact,milestone...

1490


In what occasion we can specify global sheet and action sheet?

562


How to find the name of the machine where you are running your automation scripts in qtp?

515


assume i have few url link how will i dynamically call then using descriptive programming?

1595


Hi could some one explan what is the use of the function Defination generator, And how to use the function defination generator.. Explan with the example..

1341


What are the methods used in UFT to handle exceptions or run-time errors?

640


What is an object repository?

597


i have two questions for regular expression :- Q1. I have date pattern eg-29/11/2011 29-11-2011 29.11.2011 Que- if any separator is there between date,month and year pattern should match else it should not match eg- pattern should not match in case of 2911-2011 Q2. let say i have a string and there is a number in between of that string eg.-Amount 30002.234 successfully credited to your account . now i have to match this pattern in such a way that even if decimal is not there pattern should match ,how i will do this using regular expression

1018