Path: csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Gene Wirchenko Newsgroups: comp.lang.java.programmer Subject: Re: Teaching kids to program (in Java) Date: Sun, 15 Apr 2012 20:05:55 -0700 Organization: A noiseless patient Spider Lines: 31 Message-ID: References: <4f87624e$0$287$14726298@news.sunsite.dk> <71igo75jrn2rodtmtv8qnc9q6hrl0n6lkt@4ax.com> <4f88c92a$0$293$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: mx04.eternal-september.org; posting-host="wKah3EH8kutwAOV6+9FiEQ"; logging-data="26573"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19SuPmA6P7eLBuloOo0XG9GximKI88Pqg8=" X-Newsreader: Forte Agent 4.2/32.1118 Cancel-Lock: sha1:Qi4JfHFCmynJBwxFC5DI9vlXk7U= Xref: csiph.com comp.lang.java.programmer:13570 On Fri, 13 Apr 2012 20:47:36 -0400, Arne Vajhøj wrote: >On 4/13/2012 11:39 AM, Gene Wirchenko wrote: [snip] >> It is not obvious to anyone who has not run across it before what >> is happening in this case. Leading zeroes are used in the RW, and >> never mean octal (that I have ever seen). > >But can you find a programming language that does not require >learning some concept that is not used outside programming. > >I doubt it. Not the point. The leading-zero octal issue is that something that appears mundane actually has a special meaning. I have seen various ways for numeric literals to be represented in code, and almost all of them have some weird characters to clue one in. Examples: =F'100' /360 & /370 Assembler fullword integer 1234H Z-80 assembler hexadecimal constant 0x1234 C's hexadecimal representation If I had not heard of the leading-zero octal gotcha and someone told me about it, it sounds that silly that I would want some proof. Sincerely, Gene Wirchenko