Andreas K. Foerster AKFoerster at AKFoerster.de
Sat Sep 22 08:14:23 CEST 2001

On Fri, Sep 21, 2001 at 06:56:03PM +0100, Lee, John wrote:

> did I miss something here...if it's windoze then
> run external program... eg jim > tmp.tmp to redirect o/p 

And how do you redirect it from within Pascal?

> open tmp.tmp for i/p eg in reset (with filemode=$40 in windoze) so you can
> read it whilst jim is writing it
> (if open fails because tmp.tmp is locked, slweep for 100 msec & retry)
> err that's it...

Okay, but creating a temporary file is a little primitive, isn't it?

> Suppose its same idea for lunix + it's variants...

In Linux it's more efficient with Popen.
With this you can redirect it directly to the program.

That's exactly what I was looking for... but for Windows.


More information about the fpc-pascal mailing list