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=-0.8 required=5.0 tests=BAYES_00,CTE_8BIT_MISMATCH, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,MAILING_LIST_MULTI, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,74b013eedc5cbd6d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-04-21 19:02:14 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!proxad.net!freenix!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: Frank Beard Newsgroups: comp.lang.ada Subject: Re: Command line Date: Wed, 21 Apr 2004 19:00:18 -0700 (PDT) Organization: Cuivre, Argent, Or Message-ID: NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: melchior.cuivre.fr.eu.org 1082599236 37545 212.85.156.195 (22 Apr 2004 02:00:36 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Thu, 22 Apr 2004 02:00:36 +0000 (UTC) To: Andreas , comp.lang.ada@ada-france.org Return-Path: In-Reply-To: X-Virus-Scanned: by amavisd-new-20030616-p7 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:7396 Date: 2004-04-21T19:00:18-07:00 --- Andreas wrote: > I need to write the file name in the command line > when i start my program. > myprog < data.txt If you are using Ada.Command_Line to pick up the name "data.txt", then you don't need the "<" to redirect it as standard input, or you could just pick up argument number 2. But it's better to drop the redirect, in that case. Otherwise, leave it the way you have it and just use Get, Get_Line, etc. (without the "file" argument) from Ada.Text_Io and it will be working with "data.txt" as standard input. Frank __________________________________ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25� http://photos.yahoo.com/ph/print_splash