We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi there, I hav ethis function call in BASCOM. Printbin Comm_buffer(1) ; 1 Any clues how to write this in C. Thanks Gopal
Ok, thanks for the feedback. I was lost because I was trying to send a float by C. It seems printbin is a really smart function that it can send char or float by distinguishing between between them by itself. However, in C, I ended up with writing another function to send a float as 4 separate chars and send them by putchar. Seems no other choice. Also, another interesting point is printbin seems to read the LSB first.
"It seems printbin is a really smart function that it can send char or float by distinguishing between between them by itself" Well, that's just the way BASIC works anyway, isn't it? BASIC basically (!) has no concept of "typing" "another interesting point is printbin seems to read the LSB first" Byte ordering is always implementation-dependent!
"It seems printbin is a really smart function" printf is pretty smart, too!