From: mcragg@gmu90x.UUCP (Maureen Cragg)
Subject: instantiating io for variant records
Date: 17 Apr 89 18:32:56 GMT [thread overview]
Message-ID: <1923@gmu90x.UUCP> (raw)
i have a variant record type defined, something like this:
type field_type is (id, date, text);
type record_type(field : field_type);
type rec_ptr is access record_type;
type record_type(field : field_type) is
record
previous : rec_ptr := null;
next : rec_ptr := null;
case field is
when id =>
id : integer;
when date =>
date : calendar.time;
when text =>
line : string(1..80);
end case;
end record;
for the purpose of storing different types of info in the same record,
as well as varying numbers of the same type(the text is used to store
free-format data, entered via an text editor:can be any number of lines).
so how does one instantiate sequential_io for this record_type? this:
package rec_io is new sequential_io(record_type);
gives the error msg: "generic package/subprogram spec/body requires
a constrained type"
adTHANXvance for any suggestions.
the air drummer
next reply other threads:[~1989-04-17 18:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1989-04-17 18:32 Maureen Cragg [this message]
1989-04-18 1:46 ` instantiating io for variant records Maureen Cragg
1989-04-19 12:40 ` instantiating io for variant record stt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox