use output of one function in another function

Hi I was trying to use the output of one function in another function by citing directly the name of the variables/strings in this one function but it seems the external function doesn't recognize the variables/strings I was trying to use. How should I specify a location or properties of the variables in the "internal" function so that it can be accessed from "outside"? Thank you!!
This doesn't work because strings and variables are specific to that function. You can use global strings and global variables so that various functions can access them. I suggest reading the manual on their use because it greatly increases the complexity of what you are doing (it also makes debugging more difficult).

A more simple alternative is to return a variable if that is all you want to do. Alternatively, you can set values in numeric or text waves which can be accessed from outside.
Concering access:
Depending on your specific task, it might also be worth to have a look at the pass by reference method to access variables (rather than by value):
displayhelptopic "Pass-By-Reference"

Be careful. Lots of traps ahead :-)
HJ
Concerning location:
I usually use a string constant in the preamble of the procedure file to set a base data folder
StrConstant MyBaseFolder="root:NAC:"
//...
SetDataFolder $MyBaseFolder+"Variables" //example 1
NVar Duration // If 'Duration' is defined in 'root:NAC:Variables'
//...
NVar Amount=$MyBaseFolder+"Experiment:AmountOfDatapoints"//example 2 works form any position

HJ