DAIO(3L) Senya Basin DAIO(3L) NAME daio, opda, clda, rdda, wrda, irdda, iwrda - easy and efficient DIRECT ACCESS i/o from FORTRAN. SYNOPSIS integer lun - logical unit number (0-99) integer cntrl - 0 -read only; 1 -update or create; 2 -always recreate character*(*) file - filename integer len - length of one array's ELEMENT in bytes integer offset - variable: on input: the array's offset in file in bytes on output: the next available offset (0 - BOF) integer dim - dimension of the array to be read/written DESCRIPTION This is a set of "C"'s fopen/fwrite/fread/fseek/ftell-based subroutines to provide an efficient and easy direct access i/o from FORTRAN. FORTRAN INTERFACE call opda (lun, cntrl, file) call clda (lun) - to open/close file as DIRECT ACCESS one. call rdda (lun, len, offset, dim, array) call wrda (lun, len, offset, dim, array) - to read/write "dim" elements of the array from the specified offset integer function irdda (len, dim, array) integer function iwrda (len, dim, array) - to read/write "dim" elements of the array from current address & file. they both return the value of next available address in bytes. MISCELLANEOUS integer function lenda (lun) - returs the current size of a file in bytes integer function nint_read (lun, N, iarray) integer function nfloat_read (lun, N, array) - reads N arbitrary (!!) ASCII-formatted INTEGER/FLOATING POINT numbers, ignoring all the "white-space" (\t \n etc) and punctuation characters; retuns the actual number of items read. COMMENTS Written by Senya Basin, May 1991; To access link with "-lsenq" on ClimateGroup systems; Questions: 'senya@rainbow.ldgo.columbia.edu' BUGS No bugs:-)