* instantiating io for variant records
@ 1989-04-17 18:32 Maureen Cragg
1989-04-18 1:46 ` Maureen Cragg
1989-04-19 12:40 ` instantiating io for variant record stt
0 siblings, 2 replies; 3+ messages in thread
From: Maureen Cragg @ 1989-04-17 18:32 UTC (permalink / 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1989-04-19 12:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1989-04-17 18:32 instantiating io for variant records Maureen Cragg
1989-04-18 1:46 ` Maureen Cragg
1989-04-19 12:40 ` instantiating io for variant record stt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox