NCEP CCS Conversion Guide |
Issues Converting FORTRAN and C/C++ Programs |
Back to Main Page |
Topic: Using STAT function from FORTRAN | |||
Posted by: Stephen Gilbert
Updated by: |
Post Date: 08/14/2002
Last Updated: |
||
Problem: Some FORTRAN programs use
the "C" function STAT to get information about a file such as size, mod
time, etc... The STAT function sets these values in a "struct stat"
structure, and for Fortran users, this structure is referenced by an integer
array from the calling program. When using 64 bit addressing (which
is the default on gort), some of the elements of the stat structure have
a size of 8 bytes instead of 4 bytes, so some values will be in different
elements of the output integer array.
Solution:
Caveats: I haven't mapped out all of the possible values returned. I only checked file size, since that is all I have seen being used so far. Example:
|
Back to Main Page |