Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Passing function return values

&pagelevel(4)&pagelevel

Return values of integer functions are passed in registers 0 and 1, return values of floatingpoint functions in floating-point register 0.
It is possible to pass return values with other data types in registers 0 and 1, but this is not defined by ILCS. Their representation is left to the individual programming languages.COBOL subprograms as of COBOL85 V2.0 and COBOL2000 V1.0 always behave like integer functions and return the contents of the COBOL special register RETURN-CODE to the calling program in registers 0 and 1.

As of COBOL85 Version 2.1B and COBOL2000 V1.0, the return value of a called C subprogram can be accessed via the COBOL special register RETURN-CODE by means of a control statement (see the “COBOL85 or COBOL2000 User Guide” [2 (Related publications), 4 (Related publications)]).