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.66.161.104 with SMTP id xr8mr24108647pab.26.1446576006176; Tue, 03 Nov 2015 10:40:06 -0800 (PST) X-Received: by 10.182.250.169 with SMTP id zd9mr299502obc.1.1446576006138; Tue, 03 Nov 2015 10:40:06 -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!i2no2517392igv.0!news-out.google.com!fs1ni7065igb.0!nntp.google.com!i2no3535552igv.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 3 Nov 2015 10:40:05 -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: <117ec1cb-834e-4aef-8449-0aa32c05fd27@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 18:40:06 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:28200 Date: 2015-11-03T10:40:05-08:00 List-Id: Le mardi 3 novembre 2015 00:02:11 UTC+1, AdaMagica a =E9crit : > 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. > > procedure P (X: Integer; Y: Float); -- declaration > > 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 Ada.float_text_IO.Ge= t Procedure and supply in my body package those items needed . The point i= s there are several of them(without File management) : 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 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_float (Item : out virgules_Value; Width : Field :=3D 0) is begin Ada.float_text_IO.get(Item =3D> virgules); Ada.Text_IO.Skip_Line; end Get_float; 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 if Name /=3D "fanzine" then Ada.Text_IO.Put_Line (Item =3D> "You're not Administrator."); Get_float ; else Ada.Text_IO.Get (Item =3D> Password); Ada.Text_IO.Skip_Line; Ada.Text_IO.New_Line; end if; end Get_Name; =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 procedure Get (Password : out Password_Value); =20 procedure Get_float (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 : 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.float_text_IO.Get Procedure .=20