NAME readf - read from an opened file SYNOPSIS count = readf (buf, n, fd) character buf(ARB) or integer buf(ARB) integer n filedes fd integer count returned as count/EOF DESCRIPTION Readf reads "n" bytes (or words) from the file opened on file descriptor "fd" into the array "buf". The bytes (or words) are placed in "buf" one per array element. Readf is the typical way of doing binary reads on files. Whether buf is declared an integer or a character array is dependent upon which is most appropriate for the host operating system. Readf returns the number of bytes/words actually read. In most cases, this is equal to "n". However, it may be less if an EOF has been encountered or if "fd" specified a device such as a terminal where less than "n" bytes were input. IMPLEMENTATION Readf is the typical way of implementing binary I/O. Do whatever is necessary on your system to allow users to get at the file directly. If reasonable, design readf to work properly in conjunction with getch and getlin. SEE ALSO writef, getch, putch DIAGNOSTICS None