<< feof | Stream manager | fgetl >> |
msg = ferror(fid) |
[msg, code] = ferror(fid) |
ferror(fid, 'clear') |
a file descriptor
an integer value: 0 if no error. negative value if an error is detected.
an character vector: error message equivalent to error code.
ferror inquires about file error status.
ferror(fid, 'clear') clears the error indicator for the specified file.
For more help about returned message, consult C run-time library manual for further details.
filename = [tempdir(), 'test_ferror.csv'];
fid = fopen(filename, 'w');
res = fgets(fid);
[msg, code] = ferror(fid)
Version | Description |
---|---|
1.0.0 | initial version |
Allan CORNET