|
INTEGER*4 fputc status = fputc( lunit,char ) |
|||
|---|---|---|---|
|
lunit |
INTEGER*4 |
Input |
The unit to write to |
|
char |
character |
Input |
The character to write to the unit |
|
Return value |
INTEGER*4 |
Output |
status=0: OK status>0: System error code |
character char, s*11 / 'OK by fputc' /
INTEGER*4 fputc, status
open( 1, file='tfputc.data')
do i = 1, 11
char = s(i:i)
status = fputc( 1, char )
end do
status = fputc( 1, '\n' )
end
demo% f77 -silent tfputc.f
demo% a.out
demo% cat tfputc.data
OK by fputc
demo%
See also putc(3S), intro(2), and perror(3F).