我正在尝试调用另一个文件的过程。到目前为止我得到的结果是错误:
test.p
DEFINE VARIABLE tmp AS CHARACTER.
RUN sumWords.p(INPUT "Hello", INPUT "World", OUTPUT tmp).
DISPLAY tmp.
sumWords.p
PROCEDURE sumWords:
DEFINE INPUT PARAMETER i_firstWord AS CHARACTER.
DEFINE INPUT PARAMETER i_secondWord AS CHARACTER.
DEFINE OUTPUT PARAMETER o_returnWord AS INTEGER.
o_returnWord = i_firstWord + i_secondWord.
END PROCEDURE.
test.p将参数传递给sumWords.p,它没有任何期望。 (1005)
您已在“sumWords.p”中创建了一个内部过程“sumWords”。 sumWords.p确实不期望参数。
要么改变sumWords.p并删除行PROCEDURE sumWords:
和END PROCEDURE.
这样sumWords.p需要参数。
或者更改来电者:
DEFINE VARIABLE hSumWords AS HANDLE NO-UNDO.
RUN sumWords.p PERSISTENT SET hSumWords.
RUN sumWords IN hSumWords (INPUT "Hello", INPUT "World", OUTPUT tmp).
DELETE OBJECT hSumWords.