From: Frank Cheung <fktc101@york.ac.uk>
Subject: simple problem?
Date: 1996/05/09
Date: 1996-05-09T00:00:00+00:00 [thread overview]
Message-ID: <Pine.SGI.3.91.960509195810.8410A-100000@sgi17.york.ac.uk> (raw)
Hello!
When I try to compile the code below, I get the following error:
"/usr/Ada/lib/sequential_i.A", line 67: error:
generic formal private type element_type has unconstrained
Can anyone help me out with this? The code is as follows:
with SEQUENTIAL_IO;
procedure MAIN is
package TEXT_IO is new SEQUENTIAL_IO(STRING);
use TEXT_IO;
FileName : STRING(1..12) := "hoaxfile.dat";
Time_Of_Call : STRING(1..12);
Caller_Description : STRING(1..400);
procedure CREATE_HOAX_FILE is
CallFile : FILE_TYPE;
begin
create(CallFile, NAME=>FileName);
write(CallFile, "Hoax/Complaint file created on 9th May, 1996");
close(CallFile);
end CREATE_HOAX_FILE;
procedure OUTPUT_HOAX_FILE is
CallFile : FILE_TYPE;
begin
open(CallFile, IN_FILE, FileName);
while not END_OF_FILE(CallFile) loop
read(CallFile, Time_Of_Call);
read(CallFile, Caller_Description);
end loop;
close(CallFile);
end OUTPUT_HOAX_FILE;
procedure APPEND_HOAX_FILE(Time_Of_Call, Caller_Description:STRING) is
CallFile : FILE_TYPE;
begin
open(CallFile, OUT_FILE, FileName);
write(CallFile, Time_Of_Call);
write(CallFile, Caller_Description);
close(CallFile);
end APPEND_HOAX_FILE;
begin
CREATE_HOAX_FILE;
APPEND_HOAX_FILE("12:00", "Ben");
APPEND_HOAX_FILE("12:15", "Adam");
APPEND_HOAX_FILE("18:00", "Frank");
end;
Any comments/suggestions would be appreciated. Thanks.
Frank.
________________Frank Cheung | Computer Science (BSc) Year 2_______________
/ fktc101@york.ac.uk | 0881-800800 a/c 841276 | +44-1904-430000 ext 4250 \
|James College, University of York, Heslington, Y01 5DD, York, United Kingdom|
next reply other threads:[~1996-05-09 0:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-05-09 0:00 Frank Cheung [this message]
1996-05-10 0:00 ` simple problem? Robert I. Eachus
1996-05-10 0:00 ` Kevin D. Heatwole
1996-05-10 0:00 ` John English
1996-05-10 0:00 ` Robert A Duff
1996-05-13 0:00 ` John English
1996-05-13 0:00 ` Robert A Duff
1996-05-14 0:00 ` Keith Thompson
1996-05-10 0:00 ` John Herro
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox