skip to main content

Object-oriented Programming : Methods : Method prototypes

Method prototypes
Method prototypes are method skeletons that define the method name, parameters, and information necessary to describe those parameters such as that specified in the REPOSITORY paragraph and the SPECIAL-NAMES paragraph. They do not include the procedural code. In essence they provide all of the information required to invoke a method. Method prototypes are used to specify interfaces and are specified in interface definitions.
    METHOD-ID. calculateInterest.
    DATA DIVISION.
    LINKAGE SECTION.
    01  interest-rate       PIC S9(3)v9999.
    01  interest-amount     PIC S9(9)V99.
    PROCEDURE DIVISION USING interest-rate RETURNING interest-amount.
    END METHOD.

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left