小编W0l*_*0ds的帖子

如何检查文件是否已包含在内?

我有一个这样的过程结构:

<someprocedure.p>
    <randomCode>
    <INCLUDE standardIncludeFile.i>
</someprocedure>
Run Code Online (Sandbox Code Playgroud)

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

如果someprocedure.p已经包含这两个文件,则它们不应该includedstandardIncludeFile.i.如果他们不是,他们应该includedstandardIncludeFile.i.

我可以DEFINED在里面standardIncludeFile.i用来检查那些.i文件是否已经included存在someprocedure.p

如果我在INCLUDE没有任何条件的情况下仍然使用,那么Eclipse Open-Edge编辑器会给我设置include once,但我不确定这是否是一个好方法.无论如何,这些文件都是在服务器上编译的.

目前stantarderror.i还是standardconstants.i不包含任何GLOBAL-DEFINED常量,所以我不能用那种方式检查它们DEFINED.

progress-4gl openedge

2
推荐指数
1
解决办法
228
查看次数

将具有重复值的两个List <int>相交

我有两个int类型的列表:

List<int> list1 = new List<int> {12,55,55,55,34};
List<int> list2 = new List<int> {12,55};
Run Code Online (Sandbox Code Playgroud)

如果我将list1与list2相交,那么预期的结果是{12,55,55,55}.

我怎样才能做到这一点?是否还有其他方法可以达到同样的效果?

c#

1
推荐指数
1
解决办法
1105
查看次数

获取运行时调用的 Progress 过程 .p 文件位置

假设我的系统中有一个简单的过程文件:

C:\git\project\helloworld.p

在这个过程文件中,代码需要知道它在运行时在我的系统上的位置。所以在我的电脑中,在这种情况下它将是:

C:\git\project\helloworld.p

在我朋友的电脑上可能是:

D:\codingprojects\project\helloworld.p

有什么办法可以在运行时解析过程文件位置吗?

procedure file progress-4gl openedge

0
推荐指数
1
解决办法
72
查看次数

标签 统计

openedge ×2

progress-4gl ×2

c# ×1

file ×1

procedure ×1