I found this in macro and wanted clearification of the syntax. In other words, I understand what it does but do not understand why it is written this way. Just so you understand, when a variable called status is assigned a value less than zero, that function goes to a catch statement instead of completing the rest of the function.
Expand|Select|Wrap|Line Numbers
- //if an error occurs then jump to the label
- //catch to perform the clean up operation
- #define OnErrDoAction(X) status = (X); \
- if(status < 0) \
- { \
- goto CATCH; \
- }
2.) Why are there slashes after each line?
3.) Would #define OnErrDoAction(status);
if(status < 0){....... }
work?