HM_fread()

Reads information from a binary file.

Syntax

void HM_fread(void * ptr, int size, int n, FILE * file);

Type

HyperMesh hmlib Function

Description

Inputs

ptr
A pointer to a block of memory where information is stored once it is read.
size
The size of each item to be read.
n
The number of items to be read.
file
A pointer to an open binary file.

Example

*ptr must point to a block of memory that is large enough to hold the result of the read. If the read is not successful, the function calls HM_terminate() with an appropriate error message.

Errors

None.