Returning multiple fields in one method

Is there a way in visual cobol to do the following?

public Boolean CheckIsInt (string passedString, out Int32 returnedInt)


     return Int32.TryParse(passedString, out returnedInt);


  • Verified Answer

    Yes, COBOL can do REFERENCE and OUTPUT parameters, so in this case something like:

    method-id CheckIsint.

    procedure division using by value passedString as string, output returnedInt as binary-long

                                 returning ret as condition-value.

       set ret to binary-long::TryParse(passedString, output returnedInt

    end method.