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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9b39dbd8effaa623,start X-Google-Attributes: gid103376,public From: Frank Cheung Subject: simple problem? Date: 1996/05/09 Message-ID: #1/1 X-Deja-AN: 153983823 organization: The University of York, UK content-type: TEXT/PLAIN; charset=US-ASCII mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-05-09T00:00:00+00:00 List-Id: 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|