{"id":6149,"date":"2022-12-20T18:57:58","date_gmt":"2022-12-20T21:57:58","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/eof-mann\/"},"modified":"2022-12-20T18:57:58","modified_gmt":"2022-12-20T21:57:58","slug":"eof-mann","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/eof-mann\/","title":{"rendered":"eof (mann)"},"content":{"rendered":"<h1 align=\"center\">eof<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#EXAMPLES\">EXAMPLES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#KEYWORDS\">KEYWORDS<\/a> <\/p>\n<hr>\n<p>______________________________________________________________________________<\/p>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">eof \u2212 Check for end of file condition on channel<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>eof<\/b> <i>channelId<\/i> ______________________________________________________________________________<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Returns 1 if an end of file condition occurred during the most recent input operation on <i>channelId<\/i> (such as <b>gets<\/b>), 0 otherwise.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>ChannelId<\/i> must be an identifier for an open channel such as a Tcl standard channel (<b>stdin<\/b>, <b>stdout<\/b>, or <b>stderr<\/b>), the return value from an invocation of <b>open<\/b> or <b>socket<\/b>, or the result of a channel creation command provided by a Tcl extension.<\/p>\n<h2>EXAMPLES <a name=\"EXAMPLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Read and print out the contents of a file line-by-line:<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">set f [open somefile.txt] <br \/> while {1} { <br \/> set line [gets $f] <br \/> if {[<b>eof<\/b> $f]} { <br \/> close $f <br \/> break <br \/> } <br \/> puts &#8220;Read line: $line&#8221; <br \/> }<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Read and print out the contents of a file by fixed-size records:<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">set f [open somefile.dat] <br \/> fconfigure $f -translation binary <br \/> set recordSize 40 <br \/> while {1} { <br \/> set record [read $f $recordSize] <br \/> if {[<b>eof<\/b> $f]} { <br \/> close $f <br \/> break <br \/> } <br \/> puts &#8220;Read record: $record&#8221; <br \/> }<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">file(n), open(n), close(n), fblocked(n), Tcl_StandardChannels(3)<\/p>\n<h2>KEYWORDS <a name=\"KEYWORDS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">channel, end of file<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  eof \u2212 Check for end of file condition on channel <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3783,1],"tags":[2802,2635],"class_list":["post-6149","post","type-post","status-publish","format-standard","hentry","category-n-comandos-tcl-tk","category-sin-categoria","tag-eof","tag-mann"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6149","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=6149"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6149\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=6149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=6149"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=6149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}