summaryrefslogtreecommitdiffstats
path: root/doc/binary.n
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-10-26 20:11:50 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-10-26 20:11:50 (GMT)
commit6b9dd216db20bac6c76552a6193d67a01e1d34ee (patch)
treeb86166558de62f70eef1a7524fac75f7b47a4f44 /doc/binary.n
parent236c395276f8f1cf4d5b745ea490b4966e6eb148 (diff)
downloadtcl-6b9dd216db20bac6c76552a6193d67a01e1d34ee.zip
tcl-6b9dd216db20bac6c76552a6193d67a01e1d34ee.tar.gz
tcl-6b9dd216db20bac6c76552a6193d67a01e1d34ee.tar.bz2
* changes: Updated for 8.5b2 release.core_8_5_b2
* doc/*.1: Revert doc changes that broke * doc/*.3: `make html` so we can get the release * doc/*.n: out the door.
Diffstat (limited to 'doc/binary.n')
-rw-r--r--doc/binary.n26
1 files changed, 10 insertions, 16 deletions
diff --git a/doc/binary.n b/doc/binary.n
index e98917b..5f79036 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.31 2007/10/25 14:07:32 dkf Exp $
+'\" RCS: @(#) $Id: binary.n,v 1.32 2007/10/26 20:11:52 dgp Exp $
'\"
.so man.macros
.TH binary n 8.0 Tcl "Tcl Built-In Commands"
@@ -129,9 +129,8 @@ will return a string equivalent to \fB\\xe0\\xe1\\xa0\fR.
.IP \fBh\fR 5
Stores a string of \fIcount\fR hexadecimal digits in low-to-high
within each byte in the output string. \fIArg\fR must contain a
-sequence of characters in the set
-.QW 0123456789abcdefABCDEF .
-The resulting bytes are emitted in first to last order with the hex digits
+sequence of characters in the set ``0123456789abcdefABCDEF''. The
+resulting bytes are emitted in first to last order with the hex digits
being formatted in low-to-high order within each byte. If \fIarg\fR
has fewer than \fIcount\fR digits, then zeros will be used for the
remaining digits. If \fIarg\fR has more than the specified number of
@@ -396,8 +395,7 @@ position to satisfy the current field specifier, then the
corresponding variable is left untouched and \fBbinary scan\fR returns
immediately with the number of variables that were set. If there are
not enough arguments for all of the fields in the format string that
-consume arguments, then an error is generated. The flag character
-.QW u
+consume arguments, then an error is generated. The flag character 'u'
may be given to cause some types to be read as unsigned values. The flag
is accepted for all field types but is ignored for non-integer fields.
.PP
@@ -436,10 +434,8 @@ will be sign extended. Thus the following will occur:
set signShort [\fBbinary format\fR s1 0x8000]
\fBbinary scan\fR $signShort s1 val; \fI# val == 0xFFFF8000\fR
.CE
-If you require unsigned values you can include the
-.QW u
-flag character following the field type. For example, to read an
-unsigned short value:
+If you require unsigned values you can include the 'u' flag character following
+the field type. For example, to read an unsigned short value:
.CS
set signShort [\fBbinary format\fR s1 0x8000]
\fBbinary scan\fR $signShort su1 val; \fI# val == 0x00008000\fR
@@ -476,10 +472,7 @@ will return \fB1\fR with \fBabc efghi\fR stored in \fIvar1\fR.
.RE
.IP \fBb\fR 5
The data is turned into a string of \fIcount\fR binary digits in
-low-to-high order represented as a sequence of
-.QW 1
-and
-.QW 0
+low-to-high order represented as a sequence of ``1'' and ``0''
characters. The data bytes are scanned in first to last order with
the bits being taken in low-to-high order within each byte. Any extra
bits in the last byte are ignored. If \fIcount\fR is \fB*\fR, then
@@ -505,8 +498,7 @@ will return \fB2\fR with \fB01110\fR stored in \fIvar1\fR and
.IP \fBH\fR 5
The data is turned into a string of \fIcount\fR hexadecimal digits in
high-to-low order represented as a sequence of characters in the set
-.QW 0123456789abcdef .
-The data bytes are scanned in first to last
+``0123456789abcdef''. The data bytes are scanned in first to last
order with the hex digits being taken in high-to-low order within each
byte. Any extra bits in the last byte are ignored. If \fIcount\fR is
\fB*\fR, then all of the remaining hex digits in \fIstring\fR will be
@@ -791,7 +783,9 @@ proc \fIreadString\fR {channel} {
return [encoding convertfrom utf-8 $data]
}
.CE
+
.SH "SEE ALSO"
format(n), scan(n), tclvars(n)
+
.SH KEYWORDS
binary, format, scan