les: move this thread to general please.

alexchevrier:

here is an example.

using gosubs... what you have now with everythign in one file.
Code:

? "starting a GOSUB now!"
gosub "sub1"
? "THE Gosub is finished."

exit 0


:sub1
? "the SUB1 is now running"
return





now here is an example of using UDF's (User Defined Function)


this is your main script
Code:

call 'functions.kix'

? "starting Function1"
Function1
? "Function1 is finished"



and here is Functions.kix

Code:

Function Function1
? "Running Function1!"
endfunction

Function Function2
? "Running Function2!"
endfunction