"Jeffrey R.Carter" <
spam.jrcarter.not@spam.acm.org.not> writes:
On 10/23/21 10:06, reinert wrote:
So how can I test if "file1" referes to the terminal using the
lastest GNAT Community Edition?
Have you tried
Ada.Text_IO.Name (File1) = Ada.Text_IO.Name (Ada.Text_IO.Standard_Input)
? (I haven't.)
That might well serve reinert's needs, but strictly speaking it doesn't
tell you whether File1 refers to the terminal. At best it might tell
you whether File1 and Standard_Input refer to the same external file --
which may not even be a terminal if standard input was redirected.
GNAT apparently uses "*stdin" as the Name of Standard_Input, regardless
of what actual file it refers to. There could be an actual file with
that name. It's not likely, but it means that this method could be
broken maliciously.
--
Keith Thompson (The_Other_Keith)
Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips
void Void(void) { Void(); } /* The recursive call of the void */
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)