Hi all..I have two values. a=20 ,b=30
I want to perform c= a+b and c= a*b using user define
function.please anyone give the answer






Answer / prathyusha

Res=Add (20,30)
msgbox Res
Function Add (a,b)
c=a+b
Add=c
End Function

Res1= Mul (20,30)
msgbox Res1

Function Mul (a,b)
c=a*b
Mul=c
End Function

Is This Answer Correct ?    0 Yes 0 No

Post New Answer




More VB Script Interview Questions

Write a Script for ATM in QTP

0 Answers  


How can I access an object in another frame?

1 Answers  


Please Example programms on vbscript 1)writing functions and calling functions

2 Answers   TCS, CIL,


How to write a VBscript for web page performance test i need a code send if any knows the code If any knows VBScript book plz send to me the link to my mail plz

0 Answers  


I'm new to QTP, i facing a a problem in the script says"Object not found", "Browser("").page("").frame(Name:=fminfo).webtable(). the issue is, QTp is not able to identify the web table in run time.becuase in that fram"fminfo" there are "n"table and the table do not have the names,Html id. 1) i need to count the number webtables available on that page. 2)need to identify the webtable cell values. 3)How Loop the once i get the count and retrive the cell data of each webtable? Can anyone help on this, plz.. Thanks, Suresh

3 Answers  






How do you write an SQL insert statement?

4 Answers   HCL,


which is the best institute in banglaore for software testing?

1 Answers  


give me an ex. of unoverloaded method?

2 Answers   Misys,


accept a string & display whether a is present or not

1 Answers  


filter the array values without using filter function?

0 Answers   CSS Corp, WQED,


Hi Friends Rajendra this is bhavani prasad, iam working Hyderabad. i faced one problem with qtp recording mode i.e in my application there is 100 records first we click the first record that record will be jumped to next session and 99 records will there stop the recording and run the same script .Run this script qtp does not identify the records. So plz tell me what is the solution.

0 Answers  


How can we return a value from User Defined Function ? For Eg. we have 2 functions. In Fun1 i am getting 2 values (a,b) and i am addding those 2 and storing in to another var (c). Now i want to pass that var(c) to another function (fun2). What will be the script?

6 Answers   Nous,






Categories