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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!rochester!ritcv!cci632!ccird1!rrw From: rrw@ccird1.UUCP (Rick Wessman) Newsgroups: net.lang.ada Subject: Generic list processing Message-ID: <457@ccird1.UUCP> Date: Tue, 10-Jun-86 07:59:35 EDT Article-I.D.: ccird1.457 Posted: Tue Jun 10 07:59:35 1986 Date-Received: Sat, 14-Jun-86 05:36:47 EDT Organization: CCI Rochester Development, Rochester, NY Keywords: generic List-Id: 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