KiX is an interpreter and as such there is no "compiling". Functions are defined into well... UDFs, and these UDFs may be placed into separate files and either CALLed or INCLUDEd. Look up those two commands in the manual to gain an understanding of their difference.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.