On Tue, Aug 04, 2009 at 08:36:59AM -0000, iijfet wrote:
> --- In AVR-Chat@yahoogroups.com, "aligole_2005" <aligole_2005@...> wrote:
> >
> > Hi friends
> > I want to make a function in Code vision to change a hexadecimal
> > byte to decimal or int, Can anybody help me? Maybe it 'll be good
> > that you know the hex data is stored in a string with the length of
> > 5 byte.
> > in fact I want to have the c code of the function that gives a char
> > or string hex data and give me the decimal data.
> >
>
> this is:
> #include <stdio.h>
> int main()
>
> {
> int hexa;
>
> scanf("%x", &hexa);
> printf("%d", hexa);
>
> return 0;
>
> }
scanf() and printf() are very expensive resource hogs.
--
David Kelly N4HHE, dkelly@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.Message
Re: [AVR-Chat] Re: changing hex to decimal
2009-08-04 by David Kelly
Attachments
- No local attachments were found for this message.