NAME: XDR_CLOSE PURPOSE: This routine closes the opened XDR file. CALLING SEQUENCE: XDR_CLOSE, Unit PARAMETERS: Unit: The free logic unit number obtained by XDR_OPEN. EXAMPLE: XDR_CLOSE,unit
(See xdr_open.pro)
NAME: XDR_OPEN PURPOSE: This routine opens the file for XDR read or write depends on the keyword specified by the user. Default is open for read. CALLING SEQUENCE: XDR_OPEN, Unit, Filename [,WRITE=Write] [,APPEND=Append] [,ERROR=Error] PARAMETERS: Filename: The varible specifies the input XDR file name. Unit: The free logic unit number obtained for opened file. KEYWORD PARAMETERS: WRITE: Overwrite the file for writing with new data. APPEND: Append the data at the end of file. ERROR: Returns the error code of this routine. It returns 0 if succeeded, returns negative value if failed. RESTRICTIONS: The file must contain unformatted XDR data. EXAMPLE: Example 1 - open for read xdr_open,unit,'test.xdr' Example 2 - open for write xdr_open,unit,'test.xdr',/write Example 3 - open for append xdr_open,unit,'test.xdr',/append MODIFICATION HISTORY: Written by: Ben-chin K. Cha, 11-11-00. xx-xx-xxxx comment
(See xdr_open.pro)
NAME: XDR_READ PURPOSE: This routine reads a variable data from an opened XDR unit. It supports all IDL data type except the complex number and up to 4D array. CALLING SEQUENCE: XDR_READ, Unit, Var [,ERROR=Error] INPUTS: Unit: The logic unit number returned by file open for unformatted XDR read. Var: The varible returns the data array. KEYWORD PARAMETERS: ERROR: Returns the error code of this routine. It returns 0 if succeeded, returns negative value if failed. RESTRICTIONS: The file unit must be already opened for unformatted XDR read. The data must be previously written on the file by the XDR_WRITE routine. EXAMPLE: xdr_open,unit,'test.xdr' xdr_read,unit,x xdr_close,unit MODIFICATION HISTORY: Written by: Ben-chin K. Cha, 11-11-00. xx-xx-xxxx comment
(See xdr_open.pro)
NAME: XDR_WRITE PURPOSE: This routine writes the input variable data on an opened XDR unit. It supports all IDL data type except the complex number and up to 4D array. CALLING SEQUENCE: XDR_WRITE, Unit, Var [,ERROR=Error] INPUTS: Unit: The logic unit number returned by file open for unformatted XDR write. Var: The varible contains the data array to be written to the unit. KEYWORD PARAMETERS: ERROR: Returns the error code of this routine. It returns 0 if succeeded, returns negative value if failed. RESTRICTIONS: The file unit must be already opened for unformatted XDR write. EXAMPLE: xdr_open,unit,'test.xdr',/write xdr_write,unit,x xdr_close,unit MODIFICATION HISTORY: Written by: Ben-chin K. Cha, 11-11-00. xx-xx-xxxx comment
(See xdr_open.pro)