Cobol: Standardize RETURN-CODE and return variables in CBL_* functions
Cobol runtime functions now consistently use RETURN-CODE or return variables as documented.
This commit standardizes the use of RETURN-CODE and explicit return variables across the CBL_* family of COBOL runtime functions. It aligns the implementation with official documentation, resolving inconsistencies where examples contradicted documented behavior regarding return values, thus improving predictability.
In Details
This change harmonizes the libgcobol CBL_* functions regarding their return value mechanism. Previously, documentation and examples were inconsistent, with some functions documented to use a return variable but examples relying on the RETURN-CODE special register. This commit enforces consistency, explicitly using RETURN-CODE or a return variable as specified in the (updated) documentation for each function.
- RETURN-CODE
- A special COBOL register used to return an integer status code from a called program or function to the caller. It's a common way to signal success or failure.