Sunday, December 1, 2013

Define ABL Property in an ABL Class file


As of normal programming languages Progress 4 GL or ABL language supports multiple constructs for the development of ABL applications. It supports former model Procedural and the latest OO (Object Oriented) .



USING Progress.Lang.*.

CLASS HelloClass:

    DEFINE PUBLIC PROPERTY Prop1_Char AS CHARACTER NO-UNDO
        GET():
            IF Prop1_Char = "Hello" THEN
                RETURN "Hello Given".
            RETURN "No Hellos".
        END GET.
        SET.

    DEFINE PUBLIC PROPERTY Prop2_Int AS INTEGER EXTENT 41 NO-UNDO
        GET.
        SET.

      
    CONSTRUCTOR PUBLIC HelloClass (  ):
        SUPER ().
        MESSAGE "From Default Constructor"
            VIEW-AS ALERT-BOX.
        MESSAGE Prop1_Char VIEW-AS ALERT-BOX.
       
    END CONSTRUCTOR.

END CLASS.

No comments: