[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: getF in lauxlib.c--why call feof?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 26 Mar 2008 08:55:22 -0300
> (lua - still passes the Ctrl-D test with the feof test in getF removed tho)
It does in Mac OS X, but in Linux you have to press Ctrl-D twice
if you enter some text and three times if you press it immediately!
% lua -
^D^D^D
% lua -
a=1
^D^D
%
So, like ET said, it's a precaution against faulty handling of EOF in terminals.
Python seems to have a similar problem:
http://www.thescripts.com/forum/thread507634.html
I've tested it and that program needs two ^D to end to loop, even in Python 2.5.
--lhf