Previous: x/ zvtrans Up: Translation Routines Next: x/ zvtrans_inb
call xvtrans_in(buf, stype, dtype, sihost, srhost, status) status = zvtrans_in(buf, stype, dtype, sihost, srhost);
Set up a translation buffer for input. The data will be converted from a host representation of (SIHOST,SRHOST) and data type of STYPE into the machine's native representation and data type DTYPE. So, it converts from foreign to local format. Since all processing must be done in native format on the machine the program is running on, this translation is most often needed for input from a file.
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.
SIHOST is the host representation for the source 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 SIHOST should be given even if you are dealing only with floating-point data types. See also x/ zvhost.
SRHOST is the host representation for the source 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 SRHOST 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.