[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16}?

From: Joerg Wunsch
Subject: [avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16}?
Date: Fri, 18 Nov 2005 21:29:01 +0100
User-agent: Mutt/

Dmitry Xmelkov provided speed-improved versions of itoa() & Co. that
no longer use standard division functions for formatting:


The only drawback of that approach is that its use will restrict the
posible base of these functions to either 2, 8, 10, or 16.

I tend to see this as benign, as I cannot imagine why anyone would
want to print out numbers base 7 or base 13, so I'm inclined to
replace the existing itoa() family by Dmitry's submission.  When doing
so, I'll probably rename the existing implementations to itoa_full()
etc. to preserve them in case anyone really needs that functionality.

While itoa() is not really standardized in any way (at least not for
C, I'm not sure for C++), it is commonly implemented with a possible
base of [2..36], so changing that would constitute an API change.


cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]