Newsgroups: comp.lang.c Path: utzoo!henry From: henry@zoo.toronto.edu (Henry Spencer) Subject: Re: integer to string function (itoa()) Message-ID: <1990Jul14.232606.24327@zoo.toronto.edu> Organization: U of Toronto Zoology References: <22888@boulder.Colorado.EDU> <64736@lll-winken.LLNL.GOV> <1990Jul14.084734.29071@agate.berkeley.edu> Date: Sat, 14 Jul 90 23:26:06 GMT In article <1990Jul14.084734.29071@agate.berkeley.edu> dankg@headcrash.Berkeley.EDU (Dan KoGai) writes: >... Wierd thing is that atoi() exists for scanf but itoa() >doesn't seem to exist in C standard library. Does anyone know why? The scanf family is a bit of a botch that doesn't really give you enough control to cope with real-life input. The printf family does not have this weakness, so there is much less need to bypass it. There used to be an itoa() function, long ago, if my memory isn't failing me. Once sprintf arrived, nobody ever bothered to use itoa(). It was seldom performance-critical, and everyone already knew how to use the printf family. -- NFS: all the nice semantics of MSDOS, | Henry Spencer at U of Toronto Zoology and its performance and security too. | henry@zoo.toronto.edu utzoo!henry