Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Joshua Cranmer Newsgroups: comp.lang.java.programmer Subject: Re: char to decimal Date: Thu, 05 May 2011 14:13:34 -0400 Organization: A noiseless patient Spider Lines: 16 Message-ID: References: <92ea64F3avU1@mid.individual.net> <9pednRnBeuxtPF_QnZ2dnUVZ_uGdnZ2d@earthlink.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Thu, 5 May 2011 18:13:34 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="LtjcJP1H6uHOtkcPMh0bUA"; logging-data="25684"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/IZpRoaINKHtA6mEcfVLkFvWRlm5bwGeE=" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.16pre) Gecko/20110305 Lightning/1.0b3pre Thunderbird/3.1.10pre In-Reply-To: Cancel-Lock: sha1:3J2LfAkplIWgfUMe6OSj9RtXuPQ= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:3575 On 05/05/2011 09:59 AM, Lawrence D'Oliveiro wrote: > In message<9pednRnBeuxtPF_QnZ2dnUVZ_uGdnZ2d@earthlink.com>, Patricia > Shanahan wrote: > >> There is a strong natural association between a character and the numeric >> value of its Unicode representation. There are several different ways of >> mapping between the two Boolean values and integers ... > > Only one “strong natural association”, though. 0,1; 1, -1; and 0, -1 all have arguments for their use. If you dislike the middle one, think about signs of non-zero numbers. -- Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth