comp.lang.ada
 help / color / mirror / Atom feed
From: Frank Beard <frank_ada2000@yahoo.com>
To: Andreas <andreasv@telia.com>, comp.lang.ada@ada-france.org
Subject: Re: Command line
Date: Wed, 21 Apr 2004 19:00:18 -0700 (PDT)
Date: 2004-04-21T19:00:18-07:00	[thread overview]
Message-ID: <mailman.45.1082599236.314.comp.lang.ada@ada-france.org> (raw)
In-Reply-To: <rwihc.56765$mU6.234010@newsb.telia.net>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 724 bytes --]


--- Andreas <andreasv@telia.com> wrote:
> I need to write the file name in the command line
> when i start my program.
<snip>
> myprog < data.txt
<snip>

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



  parent reply	other threads:[~2004-04-22  2:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-20 23:39 Command line Andreas
2004-04-21  0:32 ` Stephen Leake
2004-04-21  8:53 ` Preben Randhol
2004-04-21 11:19 ` Jeff C,
2004-04-21 14:07   ` Preben Randhol
2004-04-22  2:00 ` Frank Beard [this message]
2004-04-26 16:08   ` Andreas
2004-04-26 17:19     ` Marius Amado Alves
2004-04-26 17:05       ` Andreas
2004-04-26 19:56         ` Marius Amado Alves
2004-04-26 19:52           ` Andreas
2004-04-29 13:40 ` Richard  Riehle
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox