当前位置导航:炫浪网>>网络学院>>编程开发>>C++教程>>C++基础入门教程

ILE 下c/c++/cl/RPG等 混合编程

c procedure:c_module
#include <stdio.h>
void PrintMsg(char* msg){
    printf(\"=======begin to run c procedure========\\n\");
    printf(\"%s\\n\", msg);
    printf(\"=======end run c procedure========\\n\");
}

cl procedure:cl_module
CL_MODULE:PGM Parm(&MSG)
  DCL VAR(&MSG) TYPE(*CHAR) LEN(30)
  /***********************************/
  SNDMSG MSG(&MSG) TOUSR(RAOYQ)
ENDPGM

c procedure:c_call
#include <stdio.h>
void main(){
   CL_MODULE(\"CALL CL PRODURE FROM C CALLER\");
   PrintMsg(\"CALL C PRODURE FROM C CALLER\");
}

cl procedure:cl_call
PGM
   CALLPRC PRC(CL_MODULE) +
      Parm(\'CALL CL PRC WITH CL CALL\')
   CALLPRC PRC(PrintMsg) +
      Parm(\'CALL C PRC WITH CL CALL\')
ENDPGM
相关内容
赞助商链接