quote:

A user defined function (UDF) is defined in script by user with the function...endfunction commands. The code placed in the UDF body should perform some valuable task.

A UDF is a better subroutine construct than gosub...return. It has the ability to return value like a function. Also, by using the "exit" command to leave the function, you can set the value of @error to the value passed to the exit comand as in "exit 87".

it works just like inbuild functions of kixtart except the facts that it is defined in the script-file or in called file and as it's parsed on-load of the script, it can be modified between each run thus making it more dynamic.

quote:
to read more on UDFs you might want to take look on these documentatory topics:
How to use UDFs
How to write a UDF

to see some UDFs written by the community, check on our UDF library collection which is currently hosting little over 400 UDFs

_________________________
!

download KiXnet