EAGLE Help Light

fileerror()

Funkce
Returns the status of I/O operations.

Zápis
int fileeror();

Returns
The fileerror function returns 0 if everything is ok.

Description
fileerror checks the status of any I/O operations that have been performed since the last call to this function and returns 0 if everything was ok. If any of the I/O operations has caused an error, a value other than 0 will be returned.

You should call fileerror before any I/O operations to reset any previous error state, and call it again after the I/O operations to see if they were successful.

When fileerror returns a value other than 0 (thus indicating an error) a proper error message has already been given to the user.

Viz také output, printf, fileread

Příklad


fileerror();
output("file.txt", "wt") {
  printf("Test\n");
  }
if (fileerror())
   exit(1);


OBSAH Translation © 2001 ELCAD v.o.s., Copyright © 2001 CadSoft Computer GmbH