Also, any procedure which returns a string clears the value, even if the procedure is empty.
For debugging this can be critical.
Comment out the 'debug' inside the procedure and the call to the string function and see the error data is not affected.
Code: Select all
SetLastError_(2)
Procedure do_anything()
Debug "proc"
EndProcedure
Procedure$ string_function()
EndProcedure
do_anything()
string_function()
Debug "main"
Debug GetLastError_()