A subroutine which can be called from FORTRAN to read a block of bytes from an unblocked binary file. The return status code must be checked after calling the subroutine. (Note that this routine behaves differently from PBREAD2 on hitting end-of-file.)
The format and arguments for the subroutine are:
SUBROUTINE PBREAD( KUNIT, KARRAY, KOUNT, KRET)
Input parameters are INTEGERs.
KUNIT | Index of a C file pointer obtained from PBOPEN |
KOUNT | The number of BYTES to read from the file |
Output parameters are INTEGERs.
KARRAY | An integer array to accept the bytes read |
KRET | Status return code: >= 0, number of bytes read from the file -1, end-of-file is hit before the requested number of bytes has been read -2, error in reading the file |