Here's a simple (obvious?) idea...

It's an easy, no-nonsense way of packaging and using UDF libraries without having to cut and paste each function into your code.

The idea is to keep the UDF's in a seperate file (library) and to "include" them into your main script. It's very reminiscent of the old C language file inclusion directive (#include) or the Perl "use" command.

Anyway, sure would make it easier to enhance and manage these functions ...


[file: main.kix]

code:

break on

call "library.kix"

? add(1,1)

? subtract(10,5)

exit


[file: library.kix]

code:

function add($n1,$n2)


$add = $n1 + $n2


endfunction


function subtract($n1,$n2)


$subtract = $n1 - $n2


endfunction



Shawn.

Bryce... I swear I was writing this when you posted your other response. Jeez, the kixtart.org gang really do think alike (and at the same time) !

[This message has been edited by Shawn (edited 04 April 2001).]