www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Getchar()

reply "Andreas Schmid" <monkey gmx.info> writes:
Shouldn't getchar() read on character and then return? It always reads a 
whole line here.

-Andreas 
Apr 21 2005
next sibling parent zwang <nehzgnaw gmail.com> writes:
Andreas Schmid wrote:
 Shouldn't getchar() read on character and then return? It always reads a 
 whole line here.
 
 -Andreas 
 
 
This is exactly the same standard behavior of C's getchar().
Apr 21 2005
prev sibling next sibling parent reply "TechnoZeus" <TechnoZeus PeoplePC.com> writes:
Which getchar() on which operating system?

TZ

"Andreas Schmid" <monkey gmx.info> wrote in message
news:d48c0u$3jr$1 digitaldaemon.com...
 Shouldn't getchar() read on character and then return? It always reads a
 whole line here.

 -Andreas
Apr 21 2005
parent reply "Andreas Schmid" <monkey gmx.info> writes:
Windows XP.

"TechnoZeus" <TechnoZeus PeoplePC.com> wrote in message 
news:d48hqs$943$1 digitaldaemon.com...
 Which getchar() on which operating system?

 TZ

 "Andreas Schmid" <monkey gmx.info> wrote in message 
 news:d48c0u$3jr$1 digitaldaemon.com...
 Shouldn't getchar() read on character and then return? It always reads a
 whole line here.

 -Andreas
Apr 21 2005
parent "TechnoZeus" <TechnoZeus PeoplePC.com> writes:
Which getchar ?  and is that compiled and linked for Windows, or as a Dos
program?

TZ

"Andreas Schmid" <monkey gmx.info> wrote in message
news:d48j2l$ai0$1 digitaldaemon.com...
 Windows XP.

 "TechnoZeus" <TechnoZeus PeoplePC.com> wrote in message
 news:d48hqs$943$1 digitaldaemon.com...
 Which getchar() on which operating system?

 TZ

 "Andreas Schmid" <monkey gmx.info> wrote in message
 news:d48c0u$3jr$1 digitaldaemon.com...
 Shouldn't getchar() read on character and then return? It always reads a
 whole line here.

 -Andreas
Apr 21 2005
prev sibling parent Stewart Gordon <smjg_1998 yahoo.com> writes:
Andreas Schmid wrote:
 Shouldn't getchar() read on character and then return? It always reads a 
 whole line here.
Yes, because it reads from the standard input, and that's the way the standard input works. To read a single keystroke, use getch. Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Apr 21 2005