[
Lists Home |
Date Index |
Thread Index
]
- From: "Hennessy, Sean" <shennessy@devcor.com>
- To: xml-dev@ic.ac.uk
- Date: Mon, 26 Jul 1999 16:07:07 -0700
John Cowan wrote:
The basic problem is code like this:
unsigned count;
while (--count > 0) {
/* do something */
}
This loop will never fail, because unsigned numbers are always greater
than or equal to zero.
Sean says:
Correction..
unsigned numbers are not negative!
unsigned count will eventually reach zero and exit the while loop.
Those short on patience or machines with 32bit integral types
should initialize count = 10; or less and see for themselves..
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
|