gpt4 book ai didi

cobol - COBOL 中是否允许嵌套的抄写本?

转载 作者:行者123 更新时间:2023-12-03 23:57:56 26 4
gpt4 key购买 nike

我知道许多 COBOL 编译器确实允许嵌套副本(具有不同的深度),但我没有找到任何“官方”规则。问题:

  1. 是否有明确允许或禁止嵌套副本的 COBOL 标准?

  2. 有没有不允许嵌套copybooks的COBOL编译器?

最佳答案

标准允许嵌套的副本,但不允许在 REPLACING 子句中提及或操纵任何 COPY 语句。从标准的 COPY 语句,一般规则 11 到 14(COBOL 2014 7.2.2.3,在 COBOL 2002 7.1.2.3 中相同):

  1. If the REPLACING phrase is specified, the library text shall not contain a COPY statement.
  2. ...
  3. If the REPLACING phrase is not specified, the library text may contain a COPY statement that does not include a REPLACING phrase. The implementation shall support nesting of at least 5 levels, including the first COPY statement in the sequence. The library text being copied shall not cause the processing of a COPY statement that directly or indirectly copies itself.
  4. The replacing action of a COPY statement shall not introduce a COPY statement, a SOURCE FORMAT directive, a comment or a blank line.

关于cobol - COBOL 中是否允许嵌套的抄写本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37614564/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com