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
Posted: Tue Nov 26, 2002 11:31 am
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 ? ):
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
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