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 autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.36.31.204 with SMTP id d195mr3720110itd.19.1512749072027; Fri, 08 Dec 2017 08:04:32 -0800 (PST) X-Received: by 10.157.33.82 with SMTP id l18mr1297643otd.6.1512749071170; Fri, 08 Dec 2017 08:04:31 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.kjsl.com!usenet.stanford.edu!193no597778itr.0!news-out.google.com!b73ni1321ita.0!nntp.google.com!193no597773itr.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 8 Dec 2017 08:04:31 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=135.23.128.40; posting-account=cUi90woAAADTaOISowbbHM8GUD0-opJO NNTP-Posting-Host: 135.23.128.40 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: How To Write A Record To File ? From: patrick@spellingbeewinnars.org Injection-Date: Fri, 08 Dec 2017 16:04:32 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:49412 Date: 2017-12-08T08:04:31-08:00 List-Id: Hi Everyone Silly question here. I snagged this from an old book: with sequential_io ; procedure compute_total_population is package si is new sequential_io(integer); data_file : si.file_type ; result_file : si.file_type ; value : integer ; total : integer := 0 ; begin si.open(data_file, si.in_file, "census74") ; while not si.end_of_file(data_file) loop si.read(data_file, value) ; total := total + value ; end loop ; si.close(data_file) ; si.create(result_file, name => "total74") ; si.write(result_file, total); si.close(result_file) ; end compute_total_population ; sequential_io is a generic package but I can't get it to work with a type that is a record I created. Is there a way to do this, perhaps another library? Thanks for reading-Patrick