From: Gautier on
Hello!
I was surprised to see Ada.Command_Line in GNAT (3.15p and 2006 GPL) serving
the command-line argument "*.adb" indeed as N arguments, the list of files
with an "adb" extension!
ObjectAda gives the argument as-is.
Who is right then ?
It's a annoying if the wildcard expansion is done a priori, because I would
like to have it done by Ada.Directories, for a generic command-line tool...
Here, the test program:

with Ada.Command_Line; use Ada.Command_Line;
with Ada.Text_IO; use Ada.Text_IO;

procedure Args is
begin
for I in 1..Argument_Count loop
Put_Line(Integer'Image(I) & " [" & Argument(I) & ']');
end loop;
Put("Press Enter"); Skip_Line;
end;
______________________________________________________________
Gautier -- http://www.mysunrise.ch/users/gdm/index.htm
Ada programming -- http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!
From: (see below) on
On 21/2/07 20:43, in article 45dcaed8_6(a)news.bluewin.ch, "Gautier"
<gautier(a)fakeaddress.nil> wrote:

> Hello!
> I was surprised to see Ada.Command_Line in GNAT (3.15p and 2006 GPL) serving
> the command-line argument "*.adb" indeed as N arguments, the list of files
> with an "adb" extension!
> ObjectAda gives the argument as-is.
> Who is right then ?

This is an OS (shell) issue, surely?

--
Bill Findlay
<surname><forename> chez blueyonder.co.uk


From: Dr. Adrian Wrigley on
On Wed, 21 Feb 2007 21:43:41 +0100, Gautier wrote:

> Hello!
> I was surprised to see Ada.Command_Line in GNAT (3.15p and 2006 GPL) serving
> the command-line argument "*.adb" indeed as N arguments, the list of files
> with an "adb" extension!

Try:

Args "*.adb"

does this give what you expect?
--
Adrian

From: Marc A. Criley on
(see below) wrote:

> On 21/2/07 20:43, in article 45dcaed8_6(a)news.bluewin.ch, "Gautier"
> <gautier(a)fakeaddress.nil> wrote:
>
>> Hello!
>> I was surprised to see Ada.Command_Line in GNAT (3.15p and 2006 GPL)
>> serving the command-line argument "*.adb" indeed as N arguments, the list
>> of files with an "adb" extension!
>> ObjectAda gives the argument as-is.
>> Who is right then ?
>
> This is an OS (shell) issue, surely?

I was surprised as well, and I took it to be a shell issue as well.

I found that just wrapping the wildcard in quotes as Adrian suggested passes
it in as typed (with tcsh on Linux, anyway). I've got Avatox able to
accept either the wildcard or the list of files.

--
-- Marc A. Criley
-- www.mckae.com
-- Avatox - DTraq - XIA - XML EZ Out

From: Adam Beneschan on
On Feb 21, 12:59 pm, "(see below)" <yaldni...(a)blueyonder.co.uk> wrote:
> On 21/2/07 20:43, in article 45dcaed...(a)news.bluewin.ch, "Gautier"
>
> <gaut...(a)fakeaddress.nil> wrote:
> > Hello!
> > I was surprised to see Ada.Command_Line in GNAT (3.15p and 2006 GPL) serving
> > the command-line argument "*.adb" indeed as N arguments, the list of files
> > with an "adb" extension!
> > ObjectAda gives the argument as-is.
> > Who is right then ?
>
> This is an OS (shell) issue, surely?

If it were a shell issue, how could ObjectAda possibly get it right?
(The shell would expand the *.adb and ObjectAda would never see an
asterisk.)

-- Adam