我有一个这样的过程结构:
<someprocedure.p>
<randomCode>
<INCLUDE standardIncludeFile.i>
</someprocedure>
Run Code Online (Sandbox Code Playgroud)
该standardIncludeFile.i
-include文件可以用任何程序文件中使用.但是,它需要其他包含文件才能工作.F.ex. stantarderror.i
和standardconstants.i
.
如果someprocedure.p
已经包含这两个文件,则它们不应该included
在standardIncludeFile.i
.如果他们不是,他们应该included
在standardIncludeFile.i
.
我可以DEFINED
在里面standardIncludeFile.i
用来检查那些.i
文件是否已经included
存在someprocedure.p
?
如果我在INCLUDE
没有任何条件的情况下仍然使用,那么Eclipse Open-Edge编辑器会给我设置include once
,但我不确定这是否是一个好方法.无论如何,这些文件都是在服务器上编译的.
目前stantarderror.i
还是standardconstants.i
不包含任何GLOBAL-DEFINED
常量,所以我不能用那种方式检查它们DEFINED
.
我有两个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:\git\project\helloworld.p
在这个过程文件中,代码需要知道它在运行时在我的系统上的位置。所以在我的电脑中,在这种情况下它将是:
C:\git\project\helloworld.p
在我朋友的电脑上可能是:
D:\codingprojects\project\helloworld.p
有什么办法可以在运行时解析过程文件位置吗?