\:\)

Well for me it's become clear when I've started working with KiXforms.

I know it might be bad structure to call UDF's from within UDF's, but that is what I have today. I want to keep my UDF's as standalone UDF's and that they work when called (ie, call their own dependencies), but that becomes hard when you're calling several of them from a form for example, and they have the same dependencies.

Reconstructing them so that the main script calls all dependencies is of course doable, but then one would still lack a good way to know why an UDF failed. If you could check within the UDF if a dependency is loaded or not, you could return a relevant errorcode and message saying this too \:\)

I really like the idea of a function that reports loaded functions. Perhaps IsDeclared() could work so that if IsDeclared() is called without a name, it returns an array with all loaded vars and functions, and if called with a name, returns if loaded or not, like:

Syntax: IsDeclared("string", type)

Parameters:

string (optional)
The variable or function you want to know the status of. If left out, all declared variables and/or functions are returned.

type (optional)
1 = variable
2 = function

?


Edited by masken (2007-02-20 10:12 PM)
_________________________
The tart is out there