[fpc-pascal] EOF on stdin

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Sun Dec 9 22:49:51 CET 2007

Tomas Hajny wrote:

>>>> I'm trying to distinguish between a case where there is no parameter on the 
>>>> command line and where there is piped input.

>>> For unix one can simply use termio.isatty(input) I think.

> Note that you could use function Do_IsDevice 
> provided in system unit for this (if Input is 
> redirected/piped, it is not a device, otherwise 
> it uses the console device).

Thanks Tomas, noted in case I revisit this.

Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

More information about the fpc-pascal mailing list