Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to Write user defined functions?

Answer Posted / jinsha

First we have to define the function and then we have to
call the function.
Eg:
to define a function
integer biger(integer a,integer b)
if (a>b)
return a
else
return b
save the file with .inc extension as x.inc
Now to call a function
Use x.inc
test case userfn1()
int a=10
int b=5
int c=biger(a,b)
print("{c}is greater")

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to run all test cases in a testplan?

1142


Is there any way of passing values at runtime? Like scanf does in C.

2739


How to test your defaultbasestate?

1125


What are the default testplan attributes?

1044


What is stored in a test frame?

1104


What is the standard flow of execution of a test case?

1052


Can silktest switch browsers automatically?

1061


How to run a test case from a testplan file?

1122


What are the types of text lines in a testplan file?

1096


How to run a test case from a test script file?

1093


How to define values for a testplan attribute?

1147


What is the vo browser extension?

1058


How record a test case into a testplan automatically?

1016


How to specify a browser extension to a web application?

1167


How to create a test frame?

1087