summaryrefslogtreecommitdiffstats
path: root/doc/binary.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-10-29 01:42:18 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-10-29 01:42:18 (GMT)
commit71f78ed1de764f208d95b703744c7682d448c3e3 (patch)
tree8e72d3dd4068fc22320de66ab7145fa75119f54c /doc/binary.n
parentccacc920f9cd610a9a9d8e800f623c20bf43a702 (diff)
downloadtcl-71f78ed1de764f208d95b703744c7682d448c3e3.zip
tcl-71f78ed1de764f208d95b703744c7682d448c3e3.tar.gz
tcl-71f78ed1de764f208d95b703744c7682d448c3e3.tar.bz2
Next stage of doing GOOBE improvements to documentation now that the html generation works
Diffstat (limited to 'doc/binary.n')
-rw-r--r--doc/binary.n22
1 files changed, 15 insertions, 7 deletions
diff --git a/doc/binary.n b/doc/binary.n
index df990b4..62a7b87 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.33 2007/10/28 14:17:40 dkf Exp $
+'\" RCS: @(#) $Id: binary.n,v 1.34 2007/10/29 01:42:18 dkf Exp $
'\"
.so man.macros
.TH binary n 8.0 Tcl "Tcl Built-In Commands"
@@ -129,8 +129,9 @@ will return a string equivalent to \fB\exe0\exe1\exa0\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 ``0123456789abcdefABCDEF''. The
-resulting bytes are emitted in first to last order with the hex digits
+sequence of characters in the set
+.QW 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
@@ -395,7 +396,8 @@ 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 'u'
+consume arguments, then an error is generated. The flag character
+.QW 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
@@ -434,7 +436,9 @@ 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 'u' flag character following
+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:
.CS
set signShort [\fBbinary format\fR s1 0x8000]
@@ -472,7 +476,10 @@ 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 ``1'' and ``0''
+low-to-high order represented as a sequence of
+.QW 1
+and
+.QW 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
@@ -498,7 +505,8 @@ 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
-``0123456789abcdef''. The data bytes are scanned in first to last
+.QW 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