Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

ferror - Information about file I/O errors

Syntax

message = ferror(fileID)
[message, errnum] = ferror(fileID)
[...] = ferror(fileID, 'clear')

Description

message = ferror(fileID) returns the error message for the most recent file I/O operation on the specified file. If the operation was successful, message is an empty string. fileID is an integer file identifier obtained from fopen, or an identifier reserved for standard input (0), standard output (1), or standard error (2).

[message, errnum] = ferror(fileID) returns the error number. If the most recent file I/O operation was successful, errnum is 0. Negative error numbers correspond to MATLAB error messages. Positive error numbers correspond to C library error messages for your system.

[...] = ferror(fileID, 'clear') clears the error indicator for the specified file.

See Also

fclose | fopen

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS