From: patrick@spellingbeewinnars.org
Subject: Re: How To Write A Record To File ?
Date: Fri, 8 Dec 2017 08:41:55 -0800 (PST)
Date: 2017-12-08T08:41:55-08:00 [thread overview]
Message-ID: <172e751b-4292-4b9f-a047-869197b0a787@googlegroups.com> (raw)
In-Reply-To: <93474da2-9494-4686-af46-a5d1528b6960@googlegroups.com>
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);
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 ;
next prev parent reply other threads:[~2017-12-08 16:41 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-08 16:04 How To Write A Record To File ? patrick
2017-12-08 16:25 ` AdaMagica
2017-12-08 16:40 ` patrick
2017-12-08 16:41 ` patrick [this message]
2017-12-08 16:57 ` Anh Vo
2017-12-08 17:11 ` Anh Vo
2017-12-08 17:29 ` patrick
2017-12-08 16:43 ` Dmitry A. Kazakov
2017-12-08 16:53 ` patrick
2017-12-08 17:35 ` Dennis Lee Bieber
2017-12-08 18:01 ` Simon Wright
2017-12-08 23:06 ` patrick
2017-12-08 23:06 ` Victor Porton
2017-12-08 23:28 ` Simon Wright
2017-12-08 23:31 ` patrick
2017-12-09 8:03 ` Usenet (Was: How To Write A Record To File ?) Jacob Sparre Andersen
2017-12-09 9:08 ` Usenet Simon Wright
2017-12-09 14:38 ` Usenet Björn Lundin
2017-12-09 11:34 ` How To Write A Record To File ? Spiros Bousbouras
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox