From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,479138db2311e415 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Wed, 12 Oct 2005 20:58:53 -0500 From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Newbie Question: using Text_IO.Open() to read from standard input References: <1129164557.586640.154480@g14g2000cwa.googlegroups.com> X-Newsreader: Tom's custom newsreader Message-ID: Date: Wed, 12 Oct 2005 20:58:54 -0500 NNTP-Posting-Host: 24.6.102.223 X-Trace: sv3-D1CzWWdjrD/p3ww7rfOQiZUmANc7WW98Bui+1YjGgl8pRFJ+KBwkLNccbMJLhOIYDzI+LiE6SGxf8Zd!AC3s7vecI/elqjkak2r8X9UJtD5vySeJUPhFLXqxTkSL6NG4mXqKZmCOt4O5Aac13bmmY1g3c6Il X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:5575 Date: 2005-10-12T20:58:54-05:00 List-Id: > I need to open a file that is passed to my ada executable as standard > input, in the following fashion: > > ./myprogram < inputfile.txt > > My question is: How can i get the Open() function to open a file from > standard input so that I can bypass using a static file name? Standard Input is already Open when your program starts, so you don't need to open it. ARM A.10(4): "For all Get and Put procedures that operate on text files, and for many other subprograms, there are forms with and without a file parameter. ... If no file is specified, a default input file or a default output file is used." That's simplest, but you might want instead to use things from ARM 10.3 "Default Input, Output, and Error Files".