Board index » delphi » Getting name of StdOut

Getting name of StdOut

Hi,

how can I get the name of stdout or stdin from pascal program?
When I use my program like this: myprog >stdout, I need to know
the name of stdout file. I tried TextRec(output).name, but it contains only
array of 80 #0. Where can I find TextRec definition?

 Andy

PS: Pleas reply also to my address.

--------------------------------------------------------
 Ondrej 'Andy' Brablc  < http://manes.vse.cz/~xbrao01 >

 

Re:Getting name of StdOut


Ondrej 'Andy' Brablc <xbra...@manes.vse.cz> wrote:

Quote
>Hi,
>how can I get the name of stdout or stdin from pascal program?
>When I use my program like this: myprog >stdout, I need to know
>the name of stdout file. I tried TextRec(output).name, but it contains only
>array of 80 #0. Where can I find TextRec definition?

It is Input and Output, that in Pascal are the "C" equivalent of stdin
and stdout.

You will not have information on these files with TextRec.

To do piping with these standard input/output, you can't use the CRT
unit in your program. This unit take out the usage of these standard
io.

Input and Output are open and close by default at the beginning and
end of the program.

---
Roger Gariepy                            Be :-) even if you feel :-(
email: rgari...@rocler.qc.ca

Other Threads