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.140.246.213 with SMTP id r204mr23180582qhc.2.1446550951353; Tue, 03 Nov 2015 03:42:31 -0800 (PST) X-Received: by 10.182.196.9 with SMTP id ii9mr83374obc.7.1446550951321; Tue, 03 Nov 2015 03:42:31 -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!c107no4483370qgd.1!news-out.google.com!fs1ni6740igb.0!nntp.google.com!i2no2190787igv.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 3 Nov 2015 03:42:30 -0800 (PST) In-Reply-To: <097ed1af-f5a3-4b91-843c-124ae349a49a@googlegroups.com> 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> <39131715-ea95-4188-93a1-a9819aa5472b@googlegroups.com> <87d1vse2nk.fsf@adaheads.sparre-andersen.dk> <590d628d-41d5-454e-ae4d-a3c72e0ac698@googlegroups.com> <097ed1af-f5a3-4b91-843c-124ae349a49a@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <03774baa-6740-48da-9a8a-266109977f0c@googlegroups.com> Subject: Re: Re : Simple call of Procedure with Ada.float_text_IO.Get From: comicfanzine@gmail.com Injection-Date: Tue, 03 Nov 2015 11:42:31 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:28197 Date: 2015-11-03T03:42:30-08:00 List-Id: Le mardi 3 novembre 2015 00:02:11 UTC+1, AdaMagica a =E9crit=A0: > Am Montag, 2. November 2015 22:51:29 UTC+1 schrieb comicf...@gmail.com: > > Yes , but i still don't know how to fix them . It will be simple if you= explain me how to fix those errors instead of just explain the errors , by= a code . >=20 > Do you understand what parameters are? > When you call a subprogram which has parameters, you have to supply actua= l data items for *each* of them. >=20 > procedure P (X: Integer; Y: Float); -- declaration >=20 > P (X =3D> 42); -- illegal call, Y missing > P (42, 10.0); -- call OK, both parameters suppllied Thank you, that exactly my problem , i want to use the procedure Ada.text_i= o.get and supply in my body package those items needed . The point is there= are several of them(without File management) :=20 procedure Get (Item : out Num; Width : Field :=3D 0); procedure Get (From : String; Item : out Num; Last : out Positive); and, i don't know which one use in my program and how , i tried : =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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 Password : Identification.Password_Value; virgules : Identification.virgules_Value ; begin Identification.Get (Password =3D> Password); =20 if Password =3D "admin" then Ada.Text_IO.Put_Line (Item =3D> "Welcome, Administrator."); end if; =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=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D with Ada.Text_IO; with Ada.float_text_IO; -- File : identification.adb =20 package body identification is procedure Get (Item : out virgules_Value; Width : Field :=3D 0) is begin Ada.float_text_IO.get(Item =3D> virgules);=20 Ada.Text_IO.Skip_Line; end Get; procedure Get (Password : out Password_Value ) is begin Ada.Text_IO.Put (Item =3D> "Hello, User. What's your name? "); Get_Name : declare Name : 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."); Get_float ; 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;=20 =20 end Get; end identification; =3D=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 =20 procedure Get (Password : out Password_Value); =20 procedure Get (Item : out virgules_Value; Width : Field :=3D 0); -- errors: "Field" is not visible ,and, non-visible declaration at a-= textio.ads:74 end identification; =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Errors are :=20 identification.ads:13:15: "Field" is not visible identification.ads:13:15: non-visible declaration at a-textio.ads:74 As you can see , i got those errors just because i don't know how to use th= e Ada.text_io.Get Procedure .