I agree with Shawn with regard to @ERROR. There is no really compelling reason not to set it. One of the minor criticisms of KiXtart is that the use of @ERROR is inconsistant.

You should be able to rely on @ERROR to report the success/failure of a function call in every case, whether it can be intuited from the data returned or not.

Howard, if you are going to use an array to return data, I suggest you re-order it slightly so that the error value is always in the same place. My personal preference would be:
quote:
Element 0 = Error Value
Element 1 = Error String
Element 2 = Number of data returned
Element 3 = Datum 1
Element 4 = Datum 2
...
Element n+2 = Datum n