Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

An example of reading a file is given in the example file read listing below:

L10-1(1) To determine whether a file read terminates because of reaching the EOF or a device error/removal, the EOF condition should be checked using fs_feof().

L10-1(2) In most situations, either the EOF or the error indicator will be set on the file if the return value of fs_fread() is smaller than the buffer size. Consequently, this check is unnecessary.