[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Brain cramp converting a hex value to decimal



On Sep 14, 2008, at 10:43 AM, Rob Butts wrote:

> It is an integer, i_temp, who's value is 0x004F

If it's an integer, it's just an integer, in no specific base (well,  
OK, on most hardware it's really encoded in binary, but at this level  
that's largely invisible).

To make its character representation for display, you'll need to use  
some function like sprintf(), itoa(), etc. That's where you determine  
the base: itoa() will give you decimal, sprintf() lets you choose.

John Doty              Noqsi Aerospace, Ltd.
http://www.noqsi.com/
jpd@xxxxxxxxx




_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user