/sys$common/syshlp/helplib.hlb FORTRAN, Statements, OPEN, CONVERT *Conan The Librarian (sorry for the slow response - running on an old VAX) |
CONVERT = fm fm Is a character expression with one of the following options: 'LITTLE_ENDIAN'- Little endian integer data of the appropriate size (INTEGER*1, INTEGER*2, or INTEGER*4) and IEEE floating-point data of the appropriate size and type (REAL*4, REAL*8, COMPLEX*8, COMPLEX*16). INTEGER*1 data is the same for little endian and big endian. 'BIG_ENDIAN' - Big endian integer data of the appropriate size (INTEGER*1, INTEGER*2, or INTEGER*4) and IEEE floating-point data of the appropriate size and type (REAL*4, REAL*8, COMPLEX*8, COMPLEX*16). INTEGER*1 data is the same for little endian and big endian. 'CRAY' - Big endian integer data of the appropriate size (INTEGER*1, INTEGER*2, or INTEGER*4) and CRAY floating-point data of size REAL*8 or COMPLEX*16. 'IBM' - Big endian integer data of the appropriate size (INTEGER*1, INTEGER*2, or INTEGER*4) and IBM System\370 floating-point data of size REAL*4 or COMPLEX*8 (IBM short 4) and size REAL*8 or COMPLEX*16 (IBM long 8). 'VAXD' - Little endian integer data of the appropriate size (INTEGER*1, INTEGER*2, or INTEGER*4) and Compaq VAX floating-point data of format F_floating for size REAL*4 or COMPLEX*8, and D_floating for size REAL*8 or COMPLEX*16. 'VAXG' - Little endian integer data of the appropriate size (INTEGER*1, INTEGER*2, or INTEGER*4) and Compaq VAX floating-point data of format F_floating for size REAL*4 or COMPLEX*8, and G_floating for size REAL*8 or COMPLEX*16. 'NATIVE' - No data conversion. This is the default. You can use CONVERT to specify multiple formats in a single program, usually one format for each specified unit number. When reading a non-native format, the non-native format on disk is converted to native format in memory. If a converted non-native value is outside the range of the native data type, a run-time message appears. There are other ways to specify numeric format for unformatted files: you can specify a VMS logical name or the compiler option CONVERT (or OPTIONS/CONVERT). The order of precedence is VMS logical name, OPEN (CONVERT=), OPTIONS/CONVERT, and then compiler option CONVERT. The CONVERT compiler option and OPTIONS/CONVERT affect all unit numbers used by the program, while logical names and OPEN (CONVERT=) affect specific unit numbers. The following source code shows how to code the OPEN statement to read unformatted CRAY numeric data from unit 15, which might be processed and possibly written in little endian format to unit 20: OPEN (CONVERT='CRAY', FILE='graph3.dat', FORM='UNFORMATTED', 1 UNIT=15) . . . OPEN (FILE='graph3_native.dat', FORM='UNFORMATTED', UNIT=20) For more information on transporting data to or from an OpenVMS VAX system and on supported ranges for data types, see your user manual.
|