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

About get(c), put(c) and kbhit

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



Joined: 06 Apr 2008
Posts: 8

View user's profile Send private message

About get(c), put(c) and kbhit
PostPosted: Mon Apr 14, 2008 1:10 pm     Reply with quote

hai all..
can anyone here help me on the explanation on the function of get(c), put(c) and kbhit function. I have read to the manual but still don't get a clear understanding of it and can a {while} being used twice in a same function?
_________________
I am very new to the programming world...plus my english was not good at all.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Apr 14, 2008 2:16 pm     Reply with quote

Please don't ask us to write tutorials on basic C language. That is
supposed to be done by your teacher in your class.

Here is what the CCS manual says. If you have a specific question
then post the question.
Quote:
getc() --
Gets a character on the receive pin(from the specified stream in case of
GETCH GETCHAR fgetc, stdin by default). Use KBHIT to check if the
character is available.

putc() --
Puts a character over the transmit pin (on the specified stream in the
PUTCHAR or FPUTC case of FPUTC, stdout by default)

kbhit() --
Returns true when a character is received in the buffer, in case of
hardware RS232, or when the first bit is on the RCV pin in case of
software RS232. Useful for polling without waiting in getc.
40inD



Joined: 30 Jul 2007
Posts: 112
Location: Moscow, Russia

View user's profile Send private message

PostPosted: Mon Apr 14, 2008 10:28 pm     Reply with quote

Not all learn C in scool. Many people learn C by self Smile
Douglas Kennedy



Joined: 07 Sep 2003
Posts: 755
Location: Florida

View user's profile Send private message AIM Address

PostPosted: Tue Apr 15, 2008 8:50 am     Reply with quote

I've learned more than I ever hoped I could from PCM programmer and others. I agree this board is not school. Think of it as a museum. Your code could be an exhibit. You have tried almost everything you know to get your code working so then you assume your code issue is unusual. You prove it is unusual by searching the forum to see if any one has had a similar experience. If it still appears unusual then put it on display in the museum and the visitors and experts will be interested enough to examine it and hopefully see a solution. No museum displays multiple exhibits of ordinary things. Slices of bread and glasses of water are unlikely to be exhibits in a museum.
They would make the museum uninteresting to visitors and experts alike. An example of a slice of bread is the Rs232 communication question or simple C questions like what does x++ mean. They have been asked and answered too many times to be interesting.
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