You cant have functions within functions, but whether or not you can have the UDF in your main script or in a library is another question. You can include the UDF into your main script (say, at the bottom) or put it into a seperate script (for example lib.kix), then "call" it from your main script (at top of script) example:

Break On

Call "lib.kix"

...your stuff

Once you have called it, you can use any of the functions in the rest of the script body, just as if you had included it in main.

-Shawn

[ 20. June 2003, 17:03: Message edited by: Shawn ]