FunctionsDeclaration - TypeCobolTeam/TypeCobol GitHub Wiki

Declaration

Procedure-only invocation

Procedure invocation syntax
CALL <procedure-name>
    <INPUT clause>?
    <INOUT clause>?
    <OUTPUT clause>?
END-CALL?
INPUT clause syntax
INPUT < <SENDING MODE clause>? <parameter-name> >+
SHARING MODE clause syntax
BY? <CONTENT | REFERENCE | VALUE>
INOUT clause syntax
INOUT <parameter-name>+
OUTPUT clause syntax
OUTPUT <parameter-name>+
  • TCRFUN_MATCH_PARAMETERS_SIZE
    The logical size (without any concern about comp-*) of all INPUT,INOUT,OUTPUT parameters provided on a given procedure call must match the logical size of all parameters of at least one declared procedure of the same name.

  • TCRFUN_MATCH_PARAMETERS_COMPRESSION
    The physical compression of all INPUT,INOUT parameters provided on a given procedure call must match the physical compression (same comp-* between caller and callee) of all parameters of at least one declared procedure of the same name.

  • TCRFUN_EMPTY_CALL
    A CALL statement that has none of the USING, INPUT, INOUT, OUTPUT or RETURNING clauses is recognized as:

    • a procedure invocation if there is a procedure declared with no INPUT, INOUT or OUTPUT parameter visible in the current scope ;

    • a function invocation if there is a function declared with no INPUT or RETURNING parameter visible in the current scope ;

    • a standard COBOL CALL statement if there is neither.

⚠️ **GitHub.com Fallback** ⚠️