Rockwell-automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User M Manual de usuario Pagina 60

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 312
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 59
Chapter 4
!"  $ "
4-8
/*
* Now, as long as we have files on the command line to process,
* open them, read them, and output them to standard output.
*/
for ( i = 1; i < argc; i++ )
{
/*
* Remember, fopen() returns a file pointer. If the file
* pointer returned points to NULL, the file couldn’t be
* opened. Exit and tell the user why.
*/
infil = fopen ( argv[i], “r” );
if ( infil == NULL )
{
fprintf ( stderr,
“*** cat: unable to open %s. Aborting\n”,
argv[i] );
exit ( errno );
}
/*
* Now loop to get all the characters in the input file and
* put them on the output file [“stdout” for “putchar()”].
*/
while ( ( c = getc ( infil ) ) != EOF )
putchar ( c );
/*
* Done with this file. Close it and get the next one...
*/
fclose ( infil );
}
/*
* Done with all the command line arguments, so done with this
* program!
*/
exit ( 0 );
}
When you are familiar with the programming environment, proceed to any
of the chapters listed below.
If you want to: Go to:
  " #! " "    "     '  #"!
'#   "! #"! " '#      ! 
#" %"     " 
" 
!"! " " #" ! &!  #! " " "
"   '     !
" 
!"! !   " #" " 
What to Do Next
Vista de pagina 59
1 2 ... 55 56 57 58 59 60 61 62 63 64 65 ... 311 312

Comentarios a estos manuales

Sin comentarios