Previous: x/ zvtrans_inu Up: Translation Routines Next: x/ zvtrans_set
call xvtrans_out(buf, stype, dtype, dihost, drhost, status) status = zvtrans_out(buf, stype, dtype, dihost, drhost);
Set up a translation buffer for output. The data will be converted from the machine's native representation and data type of STYPE into a host representation of (DIHOST,DRHOST) and data type of DTYPE. So, it converts from local to foreign format. Since all processing must be done in native format on the machine the program is running on, this this translation is most often needed for output to a file.
This routine will be much less commonly used than the input routines. The general rule for applications is to read any format, but write the native format. Translation on output is not needed in this case. However, x/ zvtrans_out is provided for special cases where the data must be written in a different host representation.
Arguments:
BUF is the translation buffer that this routine will set up, describing the translation to be performed.
STYPE is the source data type. It corresponds to the FORMAT label item in a file. It may be one of the standard VICAR data types: ``BYTE'', ``HALF'', ``FULL'', ``REAL'', ``DOUB'', or ``COMP''. The types ``WORD'', ``LONG'', and ``COMPLEX'' are also accepted, but are obsolete and should not be used.
DTYPE is the desired destination data type. It corresponds to the FORMAT label item in a file. It may be one of the standard VICAR data types: ``BYTE'', ``HALF'', ``FULL'', ``REAL'', ``DOUB'', or ``COMP''. The types ``WORD'', ``LONG'', and ``COMPLEX'' are also accepted, but are obsolete and should not be used.
DIHOST is the host representation for the destination of integral data types. It corresponds to the INTFMT label item in a file. It may be any of the supported integer data types, which are listed in Table . It may also be ``NATIVE'' or ``LOCAL'', both of which mean the native host INTFMT. Note that DIHOST should be given even if you are dealing only with floating-point data types. See also x/ zvhost.
DRHOST is the host representation for the destination of floating-point data types. It corresponds to the REALFMT label item in a file. It may be any of the supported floating-point data types, which are listed in Table . It may also be ``NATIVE'' or ``LOCAL'', both of which mean the native host REALFMT. Note that DRHOST should be given even if you are dealing only with integral data types. See also x/ zvhost.
The returned status value. It is an argument in Fortran and the function return value in C. Any value other than SUCCESS indicates that the translation is invalid for some reason, and the translation buffer should not be used.