Forum Discussion

premanand_r's avatar
premanand_r
Occasional Contributor
11 years ago

How to call a function nested inside another function in another script to our script

HI all , 



I have a function nested inside another function in the first script as:




function Add_Department()


{


  function example()

  {

// some set of statements

  }

}



I have another script second script as:



function Edit_Department()

{



}



I need to call the example function from the first script inside the second script . How can we do this in Testcomplete 10 . Please help.



Thanks,

prem

1 Reply

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Hm...  As I understand it (and I could be wrong) function example is local to the Add_Department function and cannot be accessed from outside.  If you want to make a functiona available to multiple scripts, it's best to put it as it's own function, not nested.