Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: char to decimal Date: Thu, 05 May 2011 17:04:48 -0400 Organization: albasani.net Lines: 21 Message-ID: References: <92ea64F3avU1@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net B3RaoQ5XHlTDTF/tIxznUfoMKAJXuK7fvJaDUfGFUzb1/pYL8xz9egbj0nN0k4UlhVT+thAMJzqs40ZS0vJglg== NNTP-Posting-Date: Thu, 5 May 2011 21:04:46 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="kKaNpC3IIdpSQTFftzy1NAIXi0Yf+JVAxaTBv4qbAaBnNmSh4BrLE4KC1g2RH2d5AaXjMJuIt4aPMGtTHh3L1KO2Qq0pg42qXNBb4wpTuSYjc32/kr///rfUraSLBU6g"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 In-Reply-To: Cancel-Lock: sha1:HfkW79XHRzL7CilZTHMV7RfPPjI= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:3593 On 05/05/2011 07:18 AM, Andreas Leitgeb wrote: > Lew wrote: >> Lawrence D'Oliveiro wrote: >>> Ian Shef wrote: >>>> A char is much like an int except that: >>>> It has 16 bits instead of 32. >>>> It is unsigned, with a value from 0 through 65535. >>>> It gets special handling in some places, such as by System.out.println. >>>> The special handling by System.out.println can be avoided by casting to an >>>> int. >>> Funny, they could do all this for char, but not for boolean. >> Booleans are not numbers. > > But characters are. So, 'a' is just as naturally 97 as true isn't 1 I am not defending that decision, but the one not to make booleans numeric. -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg