COBOL GLOBAL & EXTERNAL Variable
来源:互联网 发布:矩阵乘法结合律证明 编辑:程序博客网 时间:2024/05/22 05:31
GLOBAL Variable
GLOBAL in an enclosing program makes that variable visible to a nested program with it.
PROGRAM-ID. Outer.
WORKING-STORAGE SECTION.
01 Not-Global PIC X.
01 Is-Global PIC X GLOBAL.
...
CALL "Inner"
...
PROGRAM-ID. Inner.
IF ( Not-Global .. ) <<-- error
IF ( Is-Global .. ) <<--- OK
END PROGRAM Inner.
END PROGRAM Outer.
EXTERNAL Variable
EXTERNAL data may be defined in several _separately_compiled_ (or nested but you wouldn't) and statically or dynamically linked programs and these all refer to the same data area. In other words the
EXTERNAL data items are separate objects from the programs (they are created externally to the program) whichare created by the first program containing them being loaded and are linked to by each subsequent program containing that block by name.
PROGRAM-ID. ExternSamp.
WORKING-STORAGE SECTION.
01 Is-Extern PIC X EXTERN.
But an EXTERNAL variable cannot be defined with an initialization using VALUE clause; by default, all character variable will be initialized to whitespace, and numeric variable is initialized with zero.
- COBOL GLOBAL & EXTERNAL Variable
- COBOL Pointer variable
- global variable and local variable
- Qt global variable
- 055.Global Variable 全局变量
- 055.Global Variable 全局变量
- Global Variable in PL/SQL
- Sencha Touch 2 Global Variable
- Global Variable in PL/SQL .
- Global Variable Default Initialized 0
- python global and local variable
- Static Variable, Auto Variable, Global Variable, Local Variable, Register Variable (C)
- GLOBAL variable and should be set with SET GLOBAL
- FRM-40815:Variable GLOBAL.JOBS_QF_FIND_CLKT / GLOBAL.PRIOR_COMPLETION_PROG_UNIT Does Not Exist
- Fibonancci in bash via global variable
- Robot: Set Global/Suite/Test Variable
- 056.Declare Global Variable 声明全局变量
- 057.Extern Global Variable 外部全局变量
- COBOL Define Your Own File Handler
- 互斥的ExpandableListView
- 浏览器工作原理(七):布局(Layout)
- myeclipse的破解方法~~~~附上破解包,福利
- 数据结构--单链表的基本操作(C语言实现)
- COBOL GLOBAL & EXTERNAL Variable
- 一维数组与指针
- 安卓生成序列化Parcelable接口代码小程序
- Python 打包工具对比,Nuitka vs Pyinstaller
- 解决Python2.7的UnicodeEncodeError: ‘ascii’ codec can’t encode异常错误
- RecyclerView 分组 item显示不同view
- android增量更新(差分法)
- CVPR 2016-10-18
- COBOL access record-sequential dataset sample