Echelon i.LON SmartServer 2.0 Manual de usuario Pagina 250

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 266
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 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)
Vista de pagina 249
1 2 ... 245 246 247 248 249 250 251 252 253 254 255 ... 265 266

Comentarios a estos manuales

Sin comentarios