The EXIT sets/resets the appropriate error code. Thus in a function
code:
function test($a)
;something happens
$test='returnvalue'
exit 0
endfucntion

The @ERROR macro will be actively set to '0' independent on whatever value it had before.
Alternatively, I can for example do an EXIT 87 to set the @ERROR macro to 87. I also try to mimic the regular KiXtart behavior as much as possible.
_________________________
There are two types of vessels, submarines and targets.