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

String to int16 value

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



Joined: 29 Sep 2004
Posts: 39
Location: Paris (France)

View user's profile Send private message

String to int16 value
PostPosted: Mon Dec 20, 2004 11:14 am     Reply with quote

I want to convert a string (for example "1234") to a decimal integer (=1234). Is it possible ?

Thanks by advance for your answer Cool
mvaraujo (not logged)
Guest







PostPosted: Mon Dec 20, 2004 11:24 am     Reply with quote

Check the help / manual:

see atoi(), atol(), atoi32() and atof().
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Mon Dec 20, 2004 11:25 am     Reply with quote

int16 is a long in CCS. Take a look at the function atol().
mvaraujo (not logged)
Guest







PostPosted: Mon Dec 20, 2004 12:55 pm     Reply with quote

Mark,

I think it's important to him to know that there are other options of output also!

Marcus
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Mon Dec 20, 2004 6:03 pm     Reply with quote

mvaraujo (not logged) wrote:
Mark,

I think it's important to him to know that there are other options of output also!

Marcus


Then go ahead and tell him about printf, sprintf and every other routine out there Razz
YulL



Joined: 29 Sep 2004
Posts: 39
Location: Paris (France)

View user's profile Send private message

PostPosted: Tue Dec 21, 2004 2:31 am     Reply with quote

Thanks for your advice, I'm going to test it Smile
mvaraujo (not logged)
Guest







PostPosted: Tue Dec 21, 2004 12:08 pm     Reply with quote

Quote:
Then go ahead and tell him about printf, sprintf and every other routine out there


i don't think so, it's the opposite of he's trying to do! Razz
rrb011270



Joined: 07 Sep 2003
Posts: 51

View user's profile Send private message Yahoo Messenger

Re: String to int16 value
PostPosted: Thu Dec 23, 2004 4:54 pm     Reply with quote

try search this forum...

anyway, try this link http://ccsinfo.com/forum/viewtopic.php?t=20726&highlight=ascii2int8&sid=9523d7ad9a07bc8f0ee078dd9d605259

hope this helps.

::::::::::::::::::::::::::::::

YulL wrote:
I want to convert a string (for example "1234") to a decimal integer (=1234). Is it possible ?

Thanks by advance for your answer Cool
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