How to call a function library in the script? Plz explain the same with sample script

Questions by ashviniarun

Showing Answers 1 - 9 of 9 Answers

esaiesai

  • Feb 21st, 2006
 

suppose if u have function libray, make that as a compile modue

to make that libray as a compile module.

Goto File->TestProperties->TestType->select Compile Module

and

in other scirpt

use

Load("that compile module script name");

and write that function name here.

for example

public function add(in a, in b, out c)

{

 c= a+b;

}

public function demo()

{

 print("demo called");

}

suppose this is my library which i am going to save in compile module with

DEMOLIB name

and in main script write the following code to call add function

load("DEMOLIB");

add(10,20,y);

print(y);

unload("DEMOLIB");

and execute the main script. it will give result 30 by executing the demo library

bye

ramakrishna (ramakrishnaa.a@gmail.com)

  Was this answer useful?  Yes

ashvini

  • Feb 21st, 2006
 

Hi,

Ur ans was excellent. tanx. But stil i have a doubt. after choosing compile module, wat should i do? where will i give the the path for the function pgm. Plz explain

regards

  Was this answer useful?  Yes

winrunnovice

  • Mar 26th, 2006
 

Ur ans was excellent. tanx. But stil i have a doubt. after choosing compile module, wat should i do? where will i give the the path for the function pgm. Plz explain

After creating the complie module, u are calling it by using the load() statement in the actual script where u are using the library function. There is no more giving the path.

  Was this answer useful?  Yes

pavan

  • Apr 6th, 2006
 

Hi

This is pavan .give user defined pathe in Tools - general options - folders

Just mentioned u r used defined function path

bye

  Was this answer useful?  Yes

neha

  • Apr 7th, 2006
 

Hi Pavan

I have tried the same as you mentioned but it is giving error complied module not found. any other suggestion to this ?

Neha

  Was this answer useful?  Yes

Mervin Alexander

  • Apr 10th, 2006
 

If You load a Complied modue  ,use the Following Path Name STYLE(EXAMPLE)

 load("C://mydocuments//test1");

Note '// ' IS NECESSARY IN PATH NAMES

  Was this answer useful?  Yes

suresh

  • Dec 4th, 2006
 

Hello Everybody,I have a function named su, And i have a varibale Using if condition i have call the function suSu is written in the TSL

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions