CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Looking for actual itoa function code

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
horanyee
Guest







Looking for actual itoa function code
PostPosted: Fri Aug 07, 2009 10:45 am     Reply with quote

Hi,

Can someone show me how atoi() are implemented?
I like to have actual code for atoi() in CCS C compiler.

Thank you in advance!!!!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Aug 07, 2009 10:51 am     Reply with quote

http://www.ccsinfo.com/forum/viewtopic.php?t=38852
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Fri Aug 07, 2009 10:52 am     Reply with quote

Look in C:\Program Files\PICC\Drivers\INPUT.C

This universal routine takes positive and negative values, decimal and hex strings. Problem is that because of this generic implementation it compiles to a relative large function.
For example, if you know your string is always a two characters long hexadecimal value you can create a much compacter function.
horanyee
Guest







Thank you I found it.
PostPosted: Fri Aug 07, 2009 10:59 am     Reply with quote

Thank you I found it.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group