You might wonder why you would want to return a 0 (zero). Because that would stop a user that used you UDF in a for-each-in-next statement, from actually running the loop. If you return a 0, the for loop never executes, and the script just carries on - ie, no data !