Mail Archives: djgpp/1994/09/01/13:04:29
I believe this is not a bug, but a consequence of buffered input:
when an illegal input is entered, it is not *consumed* by scanf(), so
at the next iteration the buffer contents are unchanged, hence the
infinite loop.
The same behavior shows up on my Sun.
Fulvio
*=====================================================================*
| Fulvio Corno |
| Dip. Automatica e Informatica Tel: +39 11 564 7067 |
| Politecnico di Torino Fax: +39 11 564 7099 |
| C.so Duca degli Abruzzi 24 E-mail: Fulvio DOT Corno AT polito DOT it |
| I-10129 TORINO (Italy) Internet: corno AT athena DOT polito DOT it |
*=====================================================================*
- Raw text -