summaryrefslogtreecommitdiffstats
path: root/doc/puts.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/puts.n')
-rw-r--r--doc/puts.n20
1 files changed, 4 insertions, 16 deletions
diff --git a/doc/puts.n b/doc/puts.n
index 0943f87..7dbfa5e 100644
--- a/doc/puts.n
+++ b/doc/puts.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH puts n 7.5 Tcl "Tcl Built-In Commands"
.so man.macros
.BS
@@ -14,6 +14,7 @@ puts \- Write to a channel
.SH SYNOPSIS
\fBputs \fR?\fB\-nonewline\fR? ?\fIchannelId\fR? \fIstring\fR
.BE
+
.SH DESCRIPTION
.PP
Writes the characters given by \fIstring\fR to the channel given
@@ -62,47 +63,34 @@ To avoid wasting memory, nonblocking I/O should normally
be used in an event-driven fashion with the \fBfileevent\fR command
(do not invoke \fBputs\fR unless you have recently been notified
via a file event that the channel is ready for more output data).
-.SH "ENCODING ERRORS"
-.PP
-Encoding errors may exist, if the encoding profile \fBstrict\fR is used.
-\fBputs\fR writes out data until an encoding error occurs and fails with
-POSIX error code \fBEILSEQ\fR.
-
.SH EXAMPLES
-.PP
Write a short message to the console (or wherever \fBstdout\fR is
directed):
-.PP
.CS
\fBputs\fR "Hello, World!"
.CE
.PP
Print a message in several parts:
-.PP
.CS
\fBputs\fR -nonewline "Hello, "
\fBputs\fR "World!"
.CE
.PP
Print a message to the standard error channel:
-.PP
.CS
\fBputs\fR stderr "Hello, World!"
.CE
.PP
Append a log message to a file:
-.PP
.CS
set chan [open my.log a]
set timestamp [clock format [clock seconds]]
\fBputs\fR $chan "$timestamp - Hello, World!"
close $chan
.CE
+
.SH "SEE ALSO"
file(n), fileevent(n), Tcl_StandardChannels(3)
+
.SH KEYWORDS
channel, newline, output, write
-'\" Local Variables:
-'\" mode: nroff
-'\" fill-column: 78
-'\" End: