The following syntax rules must be adhered to for user-defined functions under DIALECT"ENTCOBOL"
- the FUNCTION-ID paragraph relating to the user-defined function must be contained within the IDENTIFICATION DIVISION.
- The end of the user-defined function definition is indicated by the END FUNCTION keyword.
- The PROCEDURE DIVISION header's RETURNING phrase must also be contained within the user-defined function, to indicate the
function's returning item.
- The USING phrase of the PROCEDURE DIVISION header may contain zero or more parameters of the user-defined function, which
can be passed BY REFERENCE or BY VALUE. When passing items in
.NET COBOL code, the directive MANAGED-FNC-PARAM-BY controls the default method.