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,f391a16b66b79f94,start X-Google-Attributes: gid103376,public From: Matthias Teege Subject: raised CONSTRAINT_ERROR Date: 2000/07/23 Message-ID: <86lmytp5i0.fsf@book.mteege.de>#1/1 X-Deja-AN: 649739833 Sender: matthias@book.mteege.de Organization: DVZ Datenverarbeitungszentrum Mecklenburg-Vorpommern GmbH Content-Type: text/plain; charset=iso-8859-1 User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7 Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-07-23T00:00:00+00:00 List-Id: Moin, I made my first steps in Ada using GNATS under FreeBSD and now I have a problem that I didnt understand. The followig code gives me a raised CONSTRAINT_ERROR (in Line: StrArg := Ada.Command_Line.Argument(I)) and I didnt know why. with Ada.Command_Line; use Ada.Command_Line; with GNAT.IO; use GNAT.IO; procedure Cldemo is Argcount: Natural; StrArg : String (1 .. 10); I: Positive := 1; begin Argcount := Ada.Command_Line.Argument_Count; Schleife: while I <= Argcount loop StrArg := Ada.Command_Line.Argument(I); Put_Line(StrArg); I := I + 1; end loop Schleife; end Cldemo; If I change the Code to with Ada.Command_Line; use Ada.Command_Line; with GNAT.IO; use GNAT.IO; procedure Cldemo is Argcount: Natural; I: Positive := 1; begin Argcount := Ada.Command_Line.Argument_Count; Schleife: while I <= Argcount loop Put_Line(Ada.Command_Line.Argument(I)); I := I + 1; end loop Schleife; end Cldemo; all works perfect. What is the main difference between both versions? Thanks for any hints Matthias