Echelon i.LON SmartServer Betriebsanweisung Seite 250

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 266
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 249
236 Appendix A - Programmer’s Reference
if((pFile = fopen(Filename,"a")) == NULL)
{
printf(“Can't open or create i.LON 100 file = %s \n",
Filename);
}
else
{
fwrite(buf,1,len,pFile);
fclose(pFile);
printf("Wrote %d bytes to file = %s \n", len, Filename);
}
fclose()
You can use the fclose()method to close a file.
SYNTAX
int fclose (FILE * stream);
The stream parameter specifies a pointer to a FILE object
that specifies the file stream to be
closed.
If the file has been closed successfully, this method returns a zero value. Otherwise, it returns
EOF (End-of-File).
EXAMPLE
The following example demonstrates an fclose()method that closes a file stream.
FILE * pFile;
fclose (pFile)
Seitenansicht 249
1 2 ... 245 246 247 248 249 250 251 252 253 254 255 ... 265 266

Kommentare zu diesen Handbüchern

Keine Kommentare