Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!umd5!brl-adm!adm!elder@wpafb-info2.arpa From: elder@wpafb-info2.arpa (ELDER.GREG) Newsgroups: comp.lang.c Subject: No Echo Input Under MS-DOS Message-ID: <11055@brl-adm.ARPA> Date: 31 Dec 87 07:21:04 GMT Sender: news@brl-adm.ARPA Lines: 20 I'm fairly new to C and am trying to write a program using the Datalight Optimum-C compiler version 3.01 under MS-DOS Version 2.18. Here is the pixDeqce of code I am having trouble with: printf("Enter a key: "); key = getch(); /* Get keyboard character without echoing */ printf("\nYou entered %c\n", key); When I run the program the screen remains blank until I hit a key. Only after pressing a key does the program then respond with "Enter a key: " and "You entered ". Does anyone know why this happend? Why doesn't the prompt display and then wait for the user to press a key? Is there something unique about Datalight Optimum-C which causes this? Please reply directly to me as I am not on the INFO-C distribution list. Thanks in advance for any help. Greg Elder elder@wpafb-info2.arpa ------