summaryrefslogtreecommitdiffstats
path: root/Tests/Module/WriteCompilerDetectionHeader/main.cpp
diff options
context:
space:
mode:
authorvim-cmake-syntax upstream <kwrobot@kitware.com>2020-10-28 14:37:23 (GMT)
committerBrad King <brad.king@kitware.com>2020-10-28 15:22:05 (GMT)
commit7b72d3055fbfa3e35abc7ead869c9197d5d51215 (patch)
tree0a9f94d7a32b8af06ae31d0e0d070613881e65be /Tests/Module/WriteCompilerDetectionHeader/main.cpp
parent06434fc2748f241eb6d89ffd2c0c66fb95dba9cb (diff)
downloadCMake-7b72d3055fbfa3e35abc7ead869c9197d5d51215.zip
CMake-7b72d3055fbfa3e35abc7ead869c9197d5d51215.tar.gz
CMake-7b72d3055fbfa3e35abc7ead869c9197d5d51215.tar.bz2
vim-cmake-syntax 2020-10-28 (bcc3a97a)
Code extracted from: https://github.com/pboettch/vim-cmake-syntax.git at commit bcc3a97ab934f03e112becd4ce79286793152b47 (master). Upstream Shortlog ----------------- Birger J. Nordølum (1): 2cf6c041 Add Doxygen keywords Patrick Boettcher (2): 3925b48a update to cmake version 3.16.20191028-g0e4190b bcc3a97a update to cmake version 3.19.20201028-gdab947f
Diffstat (limited to 'Tests/Module/WriteCompilerDetectionHeader/main.cpp')
0 files changed, 0 insertions, 0 deletions
ion value='bug_3600057_85'>bug_3600057_85 Tcl is a high-level, general-purpose, interpreted, dynamic programming language. It was designed with the goal of being very simple but powerful.
summaryrefslogtreecommitdiffstats
path: root/doc/eof.n
blob: 0dcf34ad0d6e8c519132940bee961f5e48a53e1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
'\"
'\" Copyright (c) 1993 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
.TH eof n 7.5 Tcl "Tcl Built-In Commands"
.so man.macros
.BS
'\" Note:  do not modify the .SH NAME line immediately below!
.SH NAME
eof \- Check for end of file condition on channel
.SH SYNOPSIS
\fBeof \fIchannelId\fR
.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
.SH "SEE ALSO"
file(n), open(n), close(n), fblocked(n), Tcl_StandardChannels(3)
.SH KEYWORDS
channel, end of file
'\" Local Variables:
'\" mode: nroff
'\" fill-column: 78
'\" End: