Many C programs use getchar in a loop to read the keyboard and exit the loop when EOF is sent. Does anyone know how to generate EOF from the PC-G850VS keyboard or if it's even possible at all?
Thank you for your time.
De nombreux programmes C utilisent getchar dans une boucle pour lire le clavier et quitter la boucle lorsque EOF est envoyé. Est-ce que quelqu'un sait comment générer EOF à partir du clavier PC-G850VS ou est-ce possible?
Merci pour votre temps.
Tom L
EOF on Sharp PC-G850VS?
Modérateur : Politburo
-
- Fonctionne à 75 bauds
- Messages : 5
- Enregistré le : 05 sept. 2018 15:03
Re: EOF on Sharp PC-G850VS?
I don't know how G850 works but on other computer EOF is for End Of File so it's related to reading a file not a keyboard input.
For keyboard input we use newline (\n) to find the end of line like this :
while (getchar() != '\n')
For keyboard input we use newline (\n) to find the end of line like this :
while (getchar() != '\n')
Commodore (64/128/Amiga), HP (28/41/48/50/71/75/200/Prime) et autres (Ti, Canon X07, Psion, Casio, Palm, Thomson, Exl, Amstrad)