子程序调用
假定程序包 含子程序:
PROGRAM FORMPOOL.
FORM SUB1.
WRITE: / 'Subroutine 1'.
ENDFORM.
FORM SUB2.
WRITE: / 'Subroutine 2'.
ENDFORM.
可在运行时 指定子程序 名,如下所 示:
PROGRAM SAPMZTST.
DATA: PROGNAME(8) VALUE 'FORMPOOL',
SUBRNAME(8).
SUBRNAME = 'SUB1'.
PERFORM (SUBRNAME) IN PROGRAM (PROGNAME) IF FOUND.
SUBRNAME = 'SUB2'.
PERFORM (SUBRNAME) IN PROGRAM (PROGNAME) IF FOUND.
作者:冯际成
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文链接,否则保留追究法律责任的权利.如有问题,请与作者联系:604756218@qq.com