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

Format Print to String

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



Joined: 25 Oct 2004
Posts: 136

View user's profile Send private message

Format Print to String
PostPosted: Tue Sep 16, 2008 9:52 am     Reply with quote

Hello,

I know that there was somewhere a solution to use the fprint command to print to a string instead to the output.

To somebody know how this works ??

What I need is this:

fprintf(com1,"Version : %C.%C\n\r",Ver1,Ver2);

the output of this command stored in a string variable which I can send to an SPI Device like -------- write_GSM_Data(string);

Any suggestions are very welcome

best regards

Andreas
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Sep 16, 2008 1:44 pm     Reply with quote

Look at the sprintf() function in the CCS manual.
Andreas



Joined: 25 Oct 2004
Posts: 136

View user's profile Send private message

PostPosted: Thu Sep 18, 2008 3:10 am     Reply with quote

Thanks alot PCM Programmer,

That helped, unfortunately I used years ago and couldn't remember the function Rolling Eyes

best regards

Andreas
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