Path: utzoo!mnetor!uunet!mcvax!diku!bk!alan From: alan@bk.dk (Alan_Rooks_sps) Newsgroups: comp.lang.c Subject: Re: Re: Constant overflow Message-ID: <35@bk.dk> Date: 11 Mar 88 11:47:41 GMT References: <2747@mmintl.UUCP> <2550059@hpisod2.HP.COM> Organization: Bruel & Kjaer, DK-2850 Naerum, Denmark Lines: 10 In article <2550059@hpisod2.HP.COM> decot@hpisod2.HP.COM (Dave Decot) writes: >It's hard to do this right unless you do some clever comparison >just before multiplying by 10 (or 8 or 16 or 2). A proven (and very simple) way to do this right was given by J. R. Parker in "A General Character to Integer Conversion Method", Software - Practice and Experience, Vol 15(8) (August '85), pp. 761-766. Alan Rooks - Bruel & Kjaer Copenhagen - ...!mcvax!bk!alan or ...!diku!bk!alan