1mNAME0m
       eof - Check for end of file condition on channel

1mSYNOPSIS0m
       1meof 4m22mchannelId0m


1mDESCRIPTION0m
       Returns  1  if an end of file condition occurred during the most recent
       input operation on 4mchannelId24m (such as 1mgets22m), 0 otherwise.

       4mChannelId24m must be an identifier for an open channel such as a Tcl stan-
       dard channel (1mstdin22m, 1mstdout22m, or 1mstderr22m), the return value from an invo-
       cation of 1mopen 22mor 1msocket22m, or the result of a channel  creation  command
       provided by a Tcl extension.

1mEXAMPLES0m
       Read and print out the contents of a file line-by-line:
              set f [open somefile.txt]
              while {1} {
                  set line [gets $f]
                  if {[1meof 22m$f]} {
                      close $f
                      break
                  }
                  puts "Read line: $line"
              }

       Read and print out the contents of a file by fixed-size records:
              set f [open somefile.dat]
              fconfigure $f -translation binary
              set recordSize 40
              while {1} {
                  set record [read $f $recordSize]
                  if {[1meof 22m$f]} {
                      close $f
                      break
                  }
                  puts "Read record: $record"
              }


1mSEE ALSO0m
       file(n), open(n), close(n), fblocked(n), Tcl_StandardChannels(3)


1mKEYWORDS0m
