Mail Archives: djgpp/2002/11/12/01:18:24
On Mon, 11 Nov 2002, deckerben wrote:
> > The representation of EOF is system dependent. On DOS systems, it is CTRL-Z
> > as opposed to the Unix convention of CTRL-D.
>
> Hmmmm... is it necessary to stick to that convention?
We cannot change DOS system calls, can we?
The possibility of an interactive program to interpret Ctrl-D as EOF
depends on how it reads its input. If it does so with standard DOS calls
(via `read', `getc' or other library functions which call DOS I/O), this
isn't possible without some very painful tweaking of the program's
original code (this is a port, remember?). In contrast, if input is read
via termios or other console-specific interface, the task is much easier,
since those I/O methods bypass normal DOS calls.
So what Python does is not necessarily applicable to Perl.
- Raw text -