⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vehicle.cbl

📁 c#设计模式WithCla
💻 CBL
字号:
      $set mfoo

      *------------------------------------------------------------
      *
      * This class was derived from following C++ implementation.
      *
      *----- Start of vehicle.h
      *
      * #ifndef __VEHICLE_H
      *   #include "Vehicle.h"
      *
      * class Vehicle
      * { int number;
      *
      *----- number is a reserved Object COBOL word. It is replaced
      *----- below by VIN
      *
      * public:
      *
      *   virtual   void registerIt ()  ;
      *
      *   virtual   void move ()   = 0;
      *
      *----- The concept of a pure virtual function is not supported
      *----- in Object COBOL.
      *
      * };
      *
      * #endif
      *
      *----- End of vehicle.h
      *----- Start of vehicle.cpp
      *
      * #include "Vehicle.h"
      *
      * void Vehicle::registerIt()
      * {
      *
      * }
      *
      * void Vehicle::move()
      * {
      *
      * }
      *----- End of vehicle.cpp

      *------------------------------------------------------------
      * Insert your description of class vehicle here
      *------------------------------------------------------------
       Class-id. vehicle
              data is protected
              inherits from Base
              with data.

       Object section.

      *------------------------------------------------------------
      * Insert names of other classes used here
      *------------------------------------------------------------
       Class-control.
           Base is class "base"
           vehicle is class "vehicle"
           .
      *------------------------------------------------------------
      * Insert shared data declarations here (class and instance).
      *------------------------------------------------------------
       working-storage section.

      $set sourceformat(free)
       77  char                   pic     x         is typedef.
       77  uns-char               pic  9(2)  comp-5 is typedef.
       77  short                  pic s9(4)  comp-5 is typedef.
       77  uns-short              pic  9(4)  comp-5 is typedef.
       77  int                    pic s9(9)  comp-5 is typedef.
       77  uns-int                pic  9(9)  comp-5 is typedef.
       77  long                   pic s9(9)  comp-5 is typedef.
       77  uns-long               pic  9(9)  comp-5 is typedef.
       77  d-l-float                         comp-2 is typedef.
       77  d-float                           comp-2 is typedef.
       77  float                             comp-1 is typedef.
       77  proc-pointer           procedure-pointer is typedef.
       77  data-pointer                     pointer is typedef.
       77  void                   pic  9(2)  comp-5 is typedef.
      $set sourceformat(fixed)

      *------------------------------------------------------------
      * Insert your class data declarations here
      *------------------------------------------------------------
       object-storage section.

      *------------------------------------------------------------
      * Add any class initialization code to the procedure division
      *------------------------------------------------------------
       procedure division.
           exit program.

       Method-id. "classMethod".

      *------------------------------------------------------------
      * Insert your method data declarations here
      *------------------------------------------------------------
       local-storage section.

       linkage section.

      *------------------------------------------------------------
      * Insert your procedure specification here
      *------------------------------------------------------------
       procedure division.

           exit method.
       end method "classMethod".

       object.

      *------------------------------------------------------------
      * Insert your object instance data declarations here
      *------------------------------------------------------------
       object-storage section.

       01  VIN                 int.

       Method-id. "registerIt".

      *------------------------------------------------------------
      * Insert your method data declarations here
      *------------------------------------------------------------
       local-storage section.

       linkage section.

      *------------------------------------------------------------
      * Insert your procedure specification here
      *------------------------------------------------------------
       procedure division.

           exit method.
       end method "registerIt".

       Method-id. "move".

      *------------------------------------------------------------
      * Insert your method data declarations here
      *------------------------------------------------------------
       local-storage section.

       linkage section.

      *------------------------------------------------------------
      * Insert your procedure specification here
      *------------------------------------------------------------
       procedure division.

           exit method.
       end method "move".
       end object.
       end class vehicle.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -