Rational Developer for System z
COBOL for Windows バージョン 7.5 プログラミング・ガイド


例: クラスの定義

次の例では、Account クラスの定義での最初の試みを示します。ただし、メソッド定義は 除きます。

 cbl thread,pgmname(longmixed)
 Identification Division.
 Class-id. Account inherits Base.
 Environment Division.
 Configuration section.
 Repository.
     Class Base    is “java.lang.Object”
     Class Account is “Account”.
*
 Identification division.
 Object.
  Data division.
  Working-storage section.
  01 AccountNumber  pic 9(6).
  01 AccountBalance pic S9(9) value zero.
*
  Procedure Division.
*
*   (Instance method definitions here)
*
 End Object.
*
 End class Account.

関連タスク
オブジェクト指向アプリケーションのコンパイル、リンク、および実行
クライアントの定義


ご利用条件 | フィードバック

Copyright IBM Corporation 1996, 2008.
このインフォメーション・センターでは Eclipse テクノロジーが採用されています。(http://www.eclipse.org)