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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,71c7addfc8ec82f6,start X-Google-Attributes: gid103376,public From: Pedro Diaz Jimenez Subject: Command Line arguments Date: 2000/05/28 Message-ID: <393124B8.846F51E7@mad.servicom.es>#1/1 X-Deja-AN: 628251384 Content-Transfer-Encoding: 7bit X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@news.wanadoo.es X-Trace: m2newsread.uni2.es 959521933 62.36.16.228 (Sun, 28 May 2000 15:52:13 MET DST) Organization: Wanadoo Usenet News - Visita http://www.wanadoo.es/ MIME-Version: 1.0 NNTP-Posting-Date: Sun, 28 May 2000 15:52:13 MET DST Newsgroups: comp.lang.ada Date: 2000-05-28T00:00:00+00:00 List-Id: Hello all: I'm trying to write a program that takes from command line arguments the name of file to proccess. I use the command_package For some reason I get a CONSTRAINT_ERROR when I try to assing Argument( 2 ) to a string: here is the code with ADA.Command_line; use Ada.Command_Line; procedure com_line is a : String (integer range 1..100); begin put( Argument_Count ); -- Here is the error: a := Argument( 2 ); put_Line( a ); end prueba; I can't understand why this happens, but when I do: tajo:~/temp4$ ./com_line hello1 hello2 hello3 hello4 hello5 hello6 7 raised CONSTRAINT_ERROR : com_line.adb:14 I use the gnat compiler for linux Please send a copy of the reply to diazjimenez@ctv.es Thanks Regards Pedro