且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

是否可以在Cobol中添加内嵌注释

更新时间:2023-12-01 19:39:52

Pre Cobol 2002否

Pre Cobol 2002 No

在Cobol 2002 *>中介绍。请参阅 Cobol 2002 和搜索内嵌注释,其中给出此示例:

In Cobol 2002 *> was introduced. see Cobol 2002 and search in-line comment, which give this example:

05 Field-X Pic XX *> Used in calculating the current THINGY
...
MOVE ABC to XYZ  *> Current-XYZ
             LMN *> Saved XYZ

还有其他一些例外


  • Exec Sql - End-Exec 中。您可以对某些SQL供应商(例如Oracle)使用内嵌注释(/ * * /)。这不是真的Cobol虽然但是嵌入语言,通常通过预编译器实现。

  • 可以是允许在行注释中的Cobols实现

  • 默认情况下,许多pre Cobol 20002编译器仅查看第7列到第72列。因此列1到6 以及第71列之后的任何内容都可以包含注释。

  • In Exec Sql - End-Exec. you are able to use in-line comments (/* */) for some SQL venders (e.g. Oracle). This is not true Cobol though but an embeded language, generally implemented via a pre-compiler. Othere Exec End-exec statement may also allow in-line comments.
  • The may be Cobols implementations that allow in line comments
  • By default many pre Cobol 20002 compiler's only look at columns 7 to 72. So columns 1 to 6 and anything after column 71 can hold comments.