lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> (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