CJ,
In the kind of situation I'm thinking of the EXIT command isn't applicable. When testing I currently need to change the @error to a variable (obviously $error is the normal choice) so that it can be set and cleared as desired. This is mainly so that all logical paths through the script can be properly tested. In essence, I'm forcing error conditions to ensure the error handling does exactly what I want. The use of variables in place of macros does work but is not an ideal arrangement.

Ok, I know this isn't quite in line with the original suggestion of setting the values within UDFs but the idea is still a great one and I think we should be allowed to set the values at will.

[This message has been edited by Fuse (edited 16 May 2001).]