mengyuxin

Constructor

Apr 18th, 2021
442
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. *&---------------------------------------------------------------------*
  2. *& Report ZMENG_CONSTRUCTOR
  3. *&---------------------------------------------------------------------*
  4. *& 构造函数是在创建对象或访问类的组件时自动调用的特殊方法。
  5. *& 每当一个对象被创建时,构造器被触发,但是我们需要调用一个方法来触发一般方法。
  6. *&---------------------------------------------------------------------*
  7. REPORT zmeng_04_constructor.
  8.  
  9. CLASS class1 DEFINITION.
  10.    PUBLIC SECTION.
  11.       METHODS: method1,
  12.                constructor.
  13. ENDCLASS.
  14.  
  15. CLASS class1 IMPLEMENTATION.
  16.    METHOD method1.
  17.       WRITE: / 'This is Method1'.
  18.    ENDMETHOD.
  19.  
  20.    METHOD constructor.
  21.       WRITE: / 'Constructor Triggered'.
  22.    ENDMETHOD.
  23. ENDCLASS.
  24.  
  25. START-OF-SELECTION.
  26.    DATA object1 TYPE REF TO class1.
  27.  
  28.    CREATE OBJECT object1.
  29.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×