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]
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to