EOF on Sharp PC-G850VS?

Une machine en panne, cassée ? Un mode de fonctionnement incompréhensible ? Exprimez-vous ici

Modérateur : Politburo

Répondre
toml_12953
Fonctionne à 75 bauds
Fonctionne à 75 bauds
Messages : 5
Enregistré le : 05 sept. 2018 15:03

EOF on Sharp PC-G850VS?

Message par toml_12953 »

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
Avatar du membre
Gege34
Fonctionne à 1200 bauds
Fonctionne à 1200 bauds
Messages : 1166
Enregistré le : 03 oct. 2014 11:19
Localisation : 31

Re: EOF on Sharp PC-G850VS?

Message par Gege34 »

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')
Commodore (64/128/Amiga), HP (28/41/48/50/71/75/200/Prime) et autres (Ti, Canon X07, Psion, Casio, Palm, Thomson, Exl, Amstrad)
Répondre

Retourner vers « Problèmes techniques »