diff options
| author | apnadkarni <apnmbx-wits@yahoo.com> | 2024-04-22 12:55:32 (GMT) |
|---|---|---|
| committer | apnadkarni <apnmbx-wits@yahoo.com> | 2024-04-22 12:55:32 (GMT) |
| commit | a4077127774087ac6cf704ed10303b1c1044ecec (patch) | |
| tree | 3e0a2c6b6d0ade6ac2017d3811254baf114e9473 /doc/eof.n | |
| parent | 15c016e791905a1a7c83ba0011f76fb838098789 (diff) | |
| parent | 805c237f9558eebd6f14aa789b796004d592328c (diff) | |
| download | tcl-a4077127774087ac6cf704ed10303b1c1044ecec.zip tcl-a4077127774087ac6cf704ed10303b1c1044ecec.tar.gz tcl-a4077127774087ac6cf704ed10303b1c1044ecec.tar.bz2 | |
Consolidate channel documentation. close, puts etc. manpages now just reference chan
Diffstat (limited to 'doc/eof.n')
| -rw-r--r-- | doc/eof.n | 45 |
1 files changed, 3 insertions, 42 deletions
@@ -16,49 +16,10 @@ eof \- Check for end of file condition on channel .BE .SH DESCRIPTION .PP -Returns 1 if an end of file condition occurred during the most -recent input operation on \fIchannelId\fR (such as \fBgets\fR), -0 otherwise. -.PP -\fIChannelId\fR must be an identifier for an open channel such as a -Tcl standard channel (\fBstdin\fR, \fBstdout\fR, or \fBstderr\fR), -the return value from an invocation of \fBopen\fR or \fBsocket\fR, or -the result of a channel creation command provided by a Tcl extension. -.SH EXAMPLES -.PP -Read and print out the contents of a file line-by-line: -.PP -.CS -set f [open somefile.txt] -while {1} { - set line [gets $f] - if {[\fBeof\fR $f]} { - close $f - break - } - puts "Read line: $line" -} -.CE -.PP -Read and print out the contents of a file by fixed-size records: -.PP -.CS -set f [open somefile.dat] -fconfigure $f -translation binary -set recordSize 40 -while {1} { - set record [read $f $recordSize] - if {[\fBeof\fR $f]} { - close $f - break - } - puts "Read record: $record" -} -.CE +The \fBeof\fR command has been superceded by the \fBchan eof\fR +command which supports the same syntax and options. .SH "SEE ALSO" -file(n), open(n), close(n), fblocked(n), Tcl_StandardChannels(3) -.SH KEYWORDS -channel, end of file +chan(n) '\" Local Variables: '\" mode: nroff '\" fill-column: 78 |
