fbindirread
This function reads records written by Fortran code that opened
the file with 'access=direct'.
All records in the file must be the
same dimensionality and type.
Synopsis
function fbindirread(
path [1] : string,
rec_num [1] : integer,
dims [*] : integer,
type [1] : string
)
Arguments
- path
- pathname to binary file
- rec_num
- record number to read from the file beginning at 0
- dims
- a singly dimensioned array of integer values that describe how to shape the data, or -1 if the size of the record is unknown.
- type
- string name of the data type of the record.
Description
fbindirread reads the rec_num record of the file
path and shapes it according to the dimension sizes specified
in the dims parameter. The data type of the record is specified
by the parameter type. If the size and dimensionality of the
record are unknown, the value -1 can be used for parameter
dims. In this case fbindirread will read in the entire
record as a singly dimensioned array.
All records in the file must have the same dimensions and must be the
same type.
Example
path = "/dummy/file"
nrec = 5
dims = (/10,30/)
x = fbindirread(path,nrec,dims,"float")
This will read the 6th record from "/dummy/file" and return a
two-dimensional [10 by 30] variable of type float to the variable "x".
Reference Manual Control Panel
NG4.1 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?
$Revision: 1.5 $ $Date: 1998/11/11 23:32:16 $