Ada.Command_Line and wildcards
- From: Gautier <gautier@xxxxxxxxxxxxxxx>
- Date: Wed, 21 Feb 2007 21:43:41 +0100
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!
.
- Follow-Ups:
- Re: Ada.Command_Line and wildcards
- From: Dr. Adrian Wrigley
- Re: Ada.Command_Line and wildcards
- From: (see below)
- Re: Ada.Command_Line and wildcards
- Prev by Date: Re: real_time.clock is not monotonic
- Next by Date: Re: Bug in GNAT GPL 2006?
- Previous by thread: Bug in GNAT GPL 2006?
- Next by thread: Re: Ada.Command_Line and wildcards
- Index(es):
Relevant Pages
|