summaryrefslogtreecommitdiffstats
path: root/doc/binary.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-10-27 09:36:58 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-10-27 09:36:58 (GMT)
commitcd7e7ec95e76bcb5bf66d7cc9e6d60aad70dba07 (patch)
tree2f66883fc243d05145536a48036f61275d482016 /doc/binary.n
parentdfe0bb63c25ec4b9669b67071a6540448d5a7379 (diff)
downloadtcl-cd7e7ec95e76bcb5bf66d7cc9e6d60aad70dba07.zip
tcl-cd7e7ec95e76bcb5bf66d7cc9e6d60aad70dba07.tar.gz
tcl-cd7e7ec95e76bcb5bf66d7cc9e6d60aad70dba07.tar.bz2
Many minor doc fixes
Diffstat (limited to 'doc/binary.n')
-rw-r--r--doc/binary.n10
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/binary.n b/doc/binary.n
index 2c66eef..54bf6c4 100644
--- a/doc/binary.n
+++ b/doc/binary.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.
'\"
-'\" RCS: @(#) $Id: binary.n,v 1.20 2004/08/31 15:19:35 dkf Exp $
+'\" RCS: @(#) $Id: binary.n,v 1.21 2004/10/27 09:36:58 dkf Exp $
'\"
.so man.macros
.TH binary n 8.0 Tcl "Tcl Built-In Commands"
@@ -745,21 +745,21 @@ universal. To transfer floating-point numbers portably between all
architectures, use their textual representation (as produced by
\fBformat\fR) instead.
.SH EXAMPLES
-This is a procedure write a Tcl string to a binary-encoded channel as
+This is a procedure to write a Tcl string to a binary-encoded channel as
UTF-8 data preceded by a length word:
.CS
proc writeString {channel string} {
set data [encoding convertto utf-8 $string]
- puts -nonewline [binary format Ia* \e
+ puts -nonewline [\fBbinary\fR format Ia* \e
[string length $data] $data]
}
.CE
-
+.PP
This procedure reads a string from a channel that was written by the
previously presented \fBwriteString\fR procedure:
.CS
proc readString {channel} {
- if {![binary scan [read $channel 4] I length]} {
+ if {![\fBbinary\fR scan [read $channel 4] I length]} {
error "missing length"
}
set data [read $channel $length]