0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

COBOLのプリプロセッサ

Posted at

C言語のプリプロセッサは、例えばこんな感じ。

#define DLEVEL  3
#if DLEVEL > 2
    display( debugptr );
#else
    #define STACK 200
#endif

同じ事をCOBOL言語で書いてみるとこう。

001000 >>DEFINE  DLEVEL AS 3
001010
001020 >>IF DLEVEL > 2
001030     display debugptr .
001040 >>ELSE
001050     >>DEFINE STACK AS 200
001060 >>END-IF

とてもよく似ています。

この書き方はCOBOLの国際規格で追加された正式な仕様ですが、
実際に使われているのをあまり見たことがありません(苦笑)。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?