Howard,

I try to use exit codes just as Ruud does in the standard Kix functions. E.g. when creating a function InGroups which checks if the user is member of all the groups given, i return the same @error as the InGroup function does.

If it is a completely new UDF, there's no standard. I prefer however to set the @error only if an error occurs (@error=0; no error, @error>0; error !).
_________________________
Kind regards,