Mail Archives: djgpp/2002/11/12/01:18:24

Date: Tue, 12 Nov 2002 08:14:08 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: deckerben <bdeck AT lycos DOT co DOT uk>
cc: djgpp AT delorie DOT com
Subject: Re: djgpp or perl?
In-Reply-To: <3dd01e72$0$3212$>
Message-ID: <Pine.SUN.3.91.1021112081039.15374F@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -

  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019