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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_FILL_THIS_FORM_SHORT,WEIRD_PORT autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.107.136.19 with SMTP id k19mr20119345iod.5.1446475588163; Mon, 02 Nov 2015 06:46:28 -0800 (PST) X-Received: by 10.182.112.234 with SMTP id it10mr209276obb.13.1446475588142; Mon, 02 Nov 2015 06:46:28 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!i2no2508689igv.0!news-out.google.com!z4ni43947ign.0!nntp.google.com!i2no1684224igv.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 2 Nov 2015 06:46:27 -0800 (PST) In-Reply-To: <87h9l4eeon.fsf@adaheads.sparre-andersen.dk> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=82.243.252.139; posting-account=zd4fUAoAAABZGnAfDxrdJ5Lpts-qUilv NNTP-Posting-Host: 82.243.252.139 References: <87h9l4eeon.fsf@adaheads.sparre-andersen.dk> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <39131715-ea95-4188-93a1-a9819aa5472b@googlegroups.com> Subject: Re: Re : Simple call of Procedure with Ada.float_text_IO.Get From: comicfanzine@gmail.com Injection-Date: Mon, 02 Nov 2015 14:46:28 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:28176 Date: 2015-11-02T06:46:27-08:00 List-Id: Le lundi 2 novembre 2015 14:03:39 UTC+1, Jacob Sparre Andersen a =E9crit=A0= : > You say that you understand the error messages. What do they mean? They mean that i don't use the "Procedure Get" right , i understand but i d= on't know how to fix it .=20 > PS: Please format your code nicely - and mark the position the error > message refers to - before posting it. Here is the code whith errors included , the presentation is better if you = copy-paste it into your text-editor: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D with Ada.Text_IO; with Identification; -- File : log_in.adb =20 Procedure log_in is Procedure check_password is=20 Password : Identification.Password_Value; =20 begin Identification.Get (Password =3D> Password); =20 if Password =3D "admin" then Ada.Text_IO.Put_Line (Item =3D> "Welcome, Administrator."); end if; =20 end check_password; virgules : Identification.virgules_Value ; =20 begin check_password; -- Here i want the procedure check_password be executed before log_in , = for the arguments given to Ada.float_text_IO.Get=20 =20 Identification.Get (virgules =3D> virgules); -- error : missing argument for parameter "From" in call to "get" declare= d at identification.ads:8 -- error : missing argument for parameter "Password" in call to "get" dec= lared at identification.ads:7 =20 if virgules'Valid then=20 Ada.Text_IO.Put_Line("A float number was not asked") ; end if; end log_in; =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D with Ada.Text_IO; -- File : identification.adb =20 package body identification is procedure Get (Password : out Password_Value ) is procedure Get=20 (From : in Password_Value; Item : out virgules_Value; Last : out Positive_package_declaration_need); is begin Ada.float_text_IO.get(Item =3D> virgules); Skip_line ;=20 end Get; begin Ada.Text_IO.Put (Item =3D> "Hello, User. What's your name? "); Get_Name : declare Name : constant String :=3D Ada.Text_IO.Get_Line; begin=20 if Name /=3D "fanzine" then Ada.Text_IO.Put_Line (Item =3D> "You're not Administrator."); procedure Get=20 (From : in Password_Value; Item : out virgules_Value; Last : out Positive_package_declaration_need); else=20 Ada.Text_IO.Get (Item =3D> Password);=20 Ada.Text_IO.Skip_Line; Ada.Text_IO.New_Line; end if; end Get_Name; end Get; end identification; =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D -- File : identification.ads =20 package identification is subtype Password_Value is String (1..5); subtype virgules_Value is Float ;=20 subtype Positive_package_declaration_need is Positive ; =20 procedure Get (Password : out Password_Value); procedure Get=20 (From : in Password_Value; Item : out virgules_Value; Last : out Positive_package_declaration_need); -- "Last" is in the declaration in Ada.float_text_IO.Get , i don't know if = i can , not use it and if it silll going to work after that . end identification; =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > PPS: Which textbook (or other sources) are you using to learn Ada? I > think it might be useful, if you tried to work through the > exercises in before continuing > your own Ada project. Thanks , i learn with many textbooks , but right now , i'm trying to use th= e fonctions in Ada.text_io(like Ada.float_text_IO.Get) right .