Rule "nocomment" gives this warning when it finds an internal procedure or user-defined function which does not begin with a comment.
PROCEDURE WhatAreWeDoingHere : DEFINE INPUT PARAMETER dx AS DECIMAL NO-UNDO. DEFINE INPUT PARAMETER dy AS DECIMAL NO-UNDO. DEFINE OUTPUT PARAMETER dz AS DECIMAL NO-UNDO. - a bunch of arcane code here - END PROCEDURE. |
An unmodified default UIB-generated comment is NOT accepted as a valid comment.
the risc:
Too less comments make it difficult to review code. At the least one might expect that procedures and functions document what their purposes are.
how to solve this:
Add a comment directly before the first statement inside the procedure (or function):
PROCEDURE WhatAreWeDoingHere :
/* purpose : in this procedure we will do an attempt to ....
params : ... */
DEFINE INPUT PARAMETER dx AS DECIMAL NO-UNDO.
DEFINE INPUT PARAMETER dy AS DECIMAL NO-UNDO.
DEFINE OUTPUT PARAMETER dz AS DECIMAL NO-UNDO.
- a bunch of arcane code here -
END PROCEDURE.
|
Or write the comment directly before the procedure (or function):
/* WhatAreWeDoingHere : in this procedure we will do an attempt to ....
params : ... */
PROCEDURE WhatAreWeDoingHere :
DEFINE INPUT PARAMETER dx AS DECIMAL NO-UNDO.
DEFINE INPUT PARAMETER dy AS DECIMAL NO-UNDO.
DEFINE OUTPUT PARAMETER dz AS DECIMAL NO-UNDO.
- a bunch of arcane code here -
END PROCEDURE.
|
How to suppress these warnings:
You can put the directive {&_proparse_ prolint-nowarn(nocomment)} directly before
the PROCEDURE/FUNCTION keyword. See also: suppress warnings.