Word Addressable I/O

 

NAME

waread - Reads a word addressable file
waread2 - Reads a word addressable file and returns an error code

 

USAGE

call waread (iun, buf, addr, nwords) (FORTRAN)
c_waread(iun, &buf, addr, nwords) (C)
ier=waread2(iun)(FORTRAN)
ier=c_waread2(iun)(C)

 

DESCRIPTION

Reads nwords words starting at address addr into buffer buf .
waread2 and c_waread2 return the number of words read if the read was successful and a negative or null number otherwise.
On byte addressable machines, WA software routines store the information in a "most significant byte first" fashion.
(click here for a FORTRAN example of use and here for a C example of use)

 

ARGUMENTS

iun

FORTRAN unit number associated to the external file to read.

buf

Buffer to store the read information.

addr

Starting word address position from which reading occurs.

nwords

Number of words to read.

 

AUTHOR

Mario Lépine - RPN

 

NOTES

WA (Word Addressable) file are 1 based, i.e. first address of the file start at word #1.
Warning: Do not mix different I/O access to the same file (ex: writda, wawrit).
Buffering configuration can be controlled via the WA_CONFIG environment variable for performance issue.

 

SEE ALSO

( waopen, waclos, wawrit )