gpt4 book ai didi

progress-4gl - 如何检查文件是否已包含?

转载 作者:行者123 更新时间:2023-12-04 04:54:54 26 4
gpt4 key购买 nike

我有这样一个程序结构:

<someprocedure.p>
<randomCode>
<INCLUDE standardIncludeFile.i>
</someprocedure>

standardIncludeFile.i-include 文件可以与任何程序文件一起使用。但是,它需要其他包含文件才能工作。 F.ex. stantarderror.istandardconstants.i

如果 someprocedure.p 已经包含这 2 个文件,则它们不应被 包含standardIncludeFile.i 中。如果不是,它们应该被包含standardIncludeFile.i中。

我可以在 standardIncludeFile.i 中使用 DEFINED 来检查那些 .i 文件是否已经被包含someprocedure.p 中?

如果我在没有任何条件的情况下使用 INCLUDE,Eclipse Open-Edge 编辑器会给我设置为 include once,但我不确定这是否合适方式。无论如何,这些文件都在服务器上编译用于生产。

目前 stantarderror.istandardconstants.i 不包含任何 GLOBAL-DEFINED 常量,所以我不能用 定义

最佳答案

在你的 incldue 文件中,做这样的事情

&IF DEFINED (stantarderror) EQ 0 &THEN
GLOBAL-DEFINE stantarderror stantarderror


// actual code here


&ENDIF

关于progress-4gl - 如何检查文件是否已包含?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41823749/

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