CNLMath : Utilities : fclose
fclose
Closes a file opened by imsl_fopen.
Synopsis
#include <imsl.h>
#include <stdio.h>
int imsl_fclose (FILE *file)
Required Arguments
FILE *file (Input/Output)
A file pointer returned from imsl_fopen.
Return Value
The return value is zero if the file is successfully closed. If there is an error, EOF is returned. EOF is defined in stdio.h.
Description
The function imsl_fclose is a wrapper around the standard C runtime function fclose. It is used to close files opened with imsl_fopen.
Note that imsl_fopen should only be used to open a file whose file pointer will be input to an IMSL C Math Library function. Use imsl_fclose to close files opened with imsl_fopen.
Note: This function is not prototyped in imsl.h. This is to avoid including stdio.h within imsl.h. An extern declaration should be explicitly used to assure compatibility with linkers.
Example
See imsl_fopen for an example of its use.