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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c76108e955e7f138 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-26 06:49:28 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sunqbc.risq.qc.ca!falcon.america.net!eagle.america.net.POSTED!not-for-mail Message-ID: <3C29E396.6E08F28D@otelco.net> From: Larry Hazel X-Mailer: Mozilla 4.78 [en] (Win98; U) X-Accept-Language: en,x-ns11F8K63r3NhQ,x-ns2r2e09OnmPe2 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Why won't this package compile? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 26 Dec 2001 08:49:58 -0600 NNTP-Posting-Host: 66.0.32.230 X-Trace: eagle.america.net 1009378167 66.0.32.230 (Wed, 26 Dec 2001 09:49:27 EST) NNTP-Posting-Date: Wed, 26 Dec 2001 09:49:27 EST Organization: 24hoursupport.com Xref: archiver1.google.com comp.lang.ada:18304 Date: 2001-12-26T08:49:58-06:00 List-Id: Liddle Feesh wrote: > > Can anyone tell me why the queue package below won't compile? > > I'm running ObjectADA Version 7.2 Special Edition, since GNAT won't run on > my machine. > > The compiler keeps throwing up "Error: Line 9, col 39 Parse error: expected > COLON, got IN, Inserting COLON. > > The line in question is: " procedure Remove(N: out Integer; Q: in out > Queue); " > > Any ideas? I'm stumped if this is actually a syntactical problem. > > -- > Liddle Feesh > ' O 0 o <"//>< ' o'^ > (Remove UNDERPANTS to reply) > > ------ > > package queue_package is > > TYPE queue is LIMITED PRIVATE; > empty_queue : EXCEPTION; > > procedure initialise (q: in out queue); > function is_empty_queue (q: queue) return boolean; > procedure add(n: in integer; q: in out queue); > procedure remove(n: out integer; q: in out queue); > --remove raises the exception "empty-queue" if applied to an empty queue > > PRIVATE > TYPE node; > TYPE link is ACCESS node; --ACCESS is a pointer type > TYPE node is RECORD > value : integer; > next : link :=NULL; > END RECORD; > > TYPE queue is RECORD > head: link; > tail: link; > END RECORD; > > END queue_package; I compiled it with GNAT 3.13P with no errors. Larry