Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #14502
| From | Dr J R Stockton <reply1224@merlyn.demon.co.uk.not.invalid> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: the if condition not workiong properly |
| Date | 2012-06-14 18:49 +0100 |
| Organization | Home |
| Message-ID | <LgOtRBDYQi2PFwVE@invalid.uk.co.demon.merlyn.invalid> (permalink) |
| References | (1 earlier) <4fd5bbd1$0$6946$e4fe514c@news2.news.xs4all.nl> <1597347.oMNUckLgyt@PointedEars.de> <n1BUf3GqMg1PFwpq@J.A830F0FF37FB96852AD08924D9443D28E23ED5CD> <d4joHGNgn51PFwfh@invalid.uk.co.demon.merlyn.invalid> <ov2gt7p84ffdfdd7krf601rnt49cgemfuv@4ax.com> |
In comp.lang.javascript message <ov2gt7p84ffdfdd7krf601rnt49cgemfuv@4ax. com>, Tue, 12 Jun 2012 20:47:14, Gene Wirchenko <genew@ocis.net> posted: >On Tue, 12 Jun 2012 20:34:56 +0100, Dr J R Stockton ><reply1224@merlyn.demon.co.uk.not.invalid> wrote: >>It can also work unreliably. Consider >> >> D = new Date() ; D.setMonth(5) >> >>which has about a 1 in 52 chance of doing what probably was not >>expected; and consider the careless implementation of Zeller's > > It depends how familiar you are with JavaScript. If you are >expecting months from 1 to 12 as everywhere else that I have seen, the >probability is 1 that it is not what was expected. I still think that >it is the stupidest language misdesign that I have run across. Yes, but I put 1 in 52 - perhaps you have not been bitten by this one yet. >>Congruence which was in a (draft?) RFC or similar in the nineteen- >>nineties; and consider the implementation of Number.toString(B) in which >>the final character was incremented if the remainder was a half or >>more. > > What was that? "9" becoming ":" in ASCII? Not for B = 10. I first noticed it when converting a fraction to binary with X.toString(2) - about half the tome, the last digit of the binary fraction was "2". I think that error is fixed now. But just what do you think 0.5.toString(9) will give in Chrome? -- (c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05. Website <http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms PAS EXE etc. : <http://www.merlyn.demon.co.uk/programs/> - see in 00index.htm Dates - miscdate.htm estrdate.htm js-dates.htm pas-time.htm critdate.htm etc.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
the if condition not workiong properly Ganesh <ganesh.vemakoti45@gmail.com> - 2012-06-10 22:54 -0700
Re: the if condition not workiong properly Jason C <jwcarlton@gmail.com> - 2012-06-11 02:27 -0700
Re: the if condition not workiong properly "Tom de Neef" <tdeneef@qolor.nl> - 2012-06-11 11:35 +0200
Re: the if condition not workiong properly Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-06-11 13:12 +0200
Re: the if condition not workiong properly John G Harris <john@nospam.demon.co.uk> - 2012-06-11 15:39 +0100
Re: the if condition not workiong properly Dr J R Stockton <reply1224@merlyn.demon.co.uk.not.invalid> - 2012-06-12 20:34 +0100
Re: the if condition not workiong properly Gene Wirchenko <genew@ocis.net> - 2012-06-12 20:47 -0700
Re: the if condition not workiong properly Dr J R Stockton <reply1224@merlyn.demon.co.uk.not.invalid> - 2012-06-14 18:49 +0100
Re: the if condition not workiong properly Gene Wirchenko <genew@ocis.net> - 2012-06-14 20:45 -0700
Re: the if condition not workiong properly "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-06-15 06:30 +0000
Re: the if condition not workiong properly Gene Wirchenko <genew@ocis.net> - 2012-06-15 09:42 -0700
Re: the if condition not workiong properly "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-06-15 18:38 +0000
Re: the if condition not workiong properly Stefan Weiss <krewecherl@gmail.com> - 2012-06-15 19:23 +0200
Re: the if condition not workiong properly Gene Wirchenko <genew@ocis.net> - 2012-06-15 12:54 -0700
Re: the if condition not workiong properly Dr J R Stockton <reply1224@merlyn.demon.co.uk.not.invalid> - 2012-06-16 21:46 +0100
Re: the if condition not workiong properly "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-06-17 08:03 +0000
Re: the if condition not workiong properly John G Harris <john@nospam.demon.co.uk> - 2012-06-14 11:08 +0100
Re: the if condition not workiong properly Gene Wirchenko <genew@ocis.net> - 2012-06-14 09:23 -0700
Re: the if condition not workiong properly Dr J R Stockton <reply1224@merlyn.demon.co.uk.not.invalid> - 2012-06-15 19:56 +0100
Re: the if condition not workiong properly Andrew Poulos <ap_prog@hotmail.com> - 2012-06-16 13:26 +1000
Re: the if condition not workiong properly John G Harris <john@nospam.demon.co.uk> - 2012-06-16 11:33 +0100
Re: the if condition not workiong properly Dr J R Stockton <reply1224@merlyn.demon.co.uk.not.invalid> - 2012-06-17 19:42 +0100
Re: the if condition not workiong properly Dr J R Stockton <reply1224@merlyn.demon.co.uk.not.invalid> - 2012-06-12 20:10 +0100
csiph-web