From: rrw@ccird1.UUCP (Rick Wessman)
Subject: Generic list processing
Date: Tue, 10-Jun-86 07:59:35 EDT [thread overview]
Date: Tue Jun 10 07:59:35 1986
Message-ID: <457@ccird1.UUCP> (raw)
I'm trying to put together a generic list processing routine for
a graphics package. Each list that I use is doubly-linked, so I
figured that I could use the same template over and over. However,
when I tried to compile the package, I got the errors shown below.
Can anybody tell me what I'm doing wrong?
Here's the package:
generic
type LIST_TYPE is private;
type LIST_POINTER is access LIST_TYPE;
package LIST_OPS is
procedure DELETE (item: LIST_POINTER; head_of_list: in out LIST_POINTER);
end LIST_OPS;
package body LIST_OPS is
procedure DELETE (item: LIST_POINTER;
head_of_list: in out LIST_POINTER) is
begin
if item = head_of_list and
then head_of_list.all.next = head_of_list then
-------------------------^A ###
--### A:error: LRM 4.1.3: inappropriate prefix
head_of_list := null;
return;
end if;
-- Otherwise, reset the pointers in the list and free the
-- item.
item.all.previous.all.next := item.all.next;
--------^A ###
--------------------------------------^B ###
--### A:error: LRM 4.1.3: inappropriate prefix
--### B:error: LRM 4.1.3: inappropriate prefix
item.all.next.all.previous := item.all.previous;
--------^A ###
--------------------------------------^B ###
--### A:error: LRM 4.1.3: inappropriate prefix
--### B:error: LRM 4.1.3: inappropriate prefix
end DELETE;
end LIST_OPS;
Thanks,
Rick Wessman
seismo!rochester!cci632!ccird1!rrw
reply other threads:[~1986-06-10 11:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox