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 CCS Technical Support

rs232 string transmision

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







rs232 string transmision
PostPosted: Tue Nov 26, 2002 9:23 am     Reply with quote

Hello... again
How I transmit a complete string by rs232. Well.. a float var

I used this command lines

float a

printf("\%f",a);

What about puts funtion?

and... receiver

#include <input.c>
char var[32];

gets(char);

It's right?

Thanks
CPB.
___________________________
This message was ported from CCS's old forum
Original Post ID: 9444
Tomi
Guest







Re: rs232 string transmision
PostPosted: Tue Nov 26, 2002 11:31 am     Reply with quote

puts() adds a CR-LF termination after the string.

:=char var[32];
:=
:=gets(char);
:=
:=It's right?

No. "char" is the type declarator, your variable's name is "var" (using Delphi Smile? ):
char var[32];
gets(var);
It waits for a CR-terminated string.
___________________________
This message was ported from CCS's old forum
Original Post ID: 9450
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