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 autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.107.32.81 with SMTP id g78mr17784587iog.120.1512753112419; Fri, 08 Dec 2017 09:11:52 -0800 (PST) X-Received: by 10.157.11.207 with SMTP id 73mr1306513oth.2.1512753112290; Fri, 08 Dec 2017 09:11:52 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.kjsl.com!usenet.stanford.edu!i6no625437itb.0!news-out.google.com!b73ni1385ita.0!nntp.google.com!i6no625435itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 8 Dec 2017 09:11:52 -0800 (PST) In-Reply-To: <07f2884a-0e7e-4afa-8c0e-d415fb9b2299@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=149.32.224.39; posting-account=Qh2kiQoAAADpCLlhT_KTYoGO8dU3n4I6 NNTP-Posting-Host: 149.32.224.39 References: <93474da2-9494-4686-af46-a5d1528b6960@googlegroups.com> <172e751b-4292-4b9f-a047-869197b0a787@googlegroups.com> <07f2884a-0e7e-4afa-8c0e-d415fb9b2299@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <196e528e-8c6b-49d4-be46-c99601eb07d1@googlegroups.com> Subject: Re: How To Write A Record To File ? From: Anh Vo Injection-Date: Fri, 08 Dec 2017 17:11:52 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:49419 Date: 2017-12-08T09:11:52-08:00 List-Id: On Friday, December 8, 2017 at 8:57:24 AM UTC-8, Anh Vo wrote: > On Friday, December 8, 2017 at 8:41:57 AM UTC-8, pat...@spellingbeewinnars.org wrote: > > Hi Adamagica > > > > Please see this failing program: > > > > -Patrick > > > > with sequential_io ; > > procedure compute_total_population is > > type foo_type is > > record > > moo : integer ; > > boo : integer ; > > end record ; > > > > foo : foo_type ; > > -- will fail here with error: > > -- expect valid subtype mark to instantiate "Element_Type" > > package si is new sequential_io(foo); > > Your basic is error to instantiate with an object of record instead of record type. Here is the correct instantiation. > > package SI is new Ada.Sequential_IO (Foo_Type); > > Anh Vo I meant "your basic error is to ... "