DOCERR: External Data and Public Variables in FORTRAN (34370)
The information in this article applies to:
- Microsoft FORTRAN Compiler for MS-DOS 4.1
- Microsoft FORTRAN Compiler for MS-DOS 5.0
- Microsoft FORTRAN Compiler for MS-DOS 5.1
- Microsoft FORTRAN compiler for OS/2 4.1
- Microsoft FORTRAN compiler for OS/2 5.0
- Microsoft FORTRAN compiler for OS/2 5.1
This article was previously published under Q34370 SUMMARY
A FORTRAN application cannot declare individual variables to be public. A
COMMON block is the only method to declare a publicly accessible variable.
In a FORTRAN program, to declare a variable or set of variables to be
public, place them in a COMMON block. Because COMMON blocks are public, an
application can access the variables through the COMMON block, but not
individually. For example, if a FORTRAN application declares a COMMON
block, an application developed in C can access the data by declaring an
external structure that contains the same data.
Modification Type: | Major | Last Reviewed: | 12/1/2003 |
---|
Keywords: | KB34370 |
---|
|