From: Larry Hazel <lhhazel@otelco.net>
Subject: Re: Why won't this package compile?
Date: Wed, 26 Dec 2001 08:49:58 -0600
Date: 2001-12-26T08:49:58-06:00 [thread overview]
Message-ID: <3C29E396.6E08F28D@otelco.net> (raw)
In-Reply-To: dlkW7.31460$4f7.4336955@news11-gui.server.ntli.net
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
next prev parent reply other threads:[~2001-12-26 14:49 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-26 13:33 Why won't this package compile? Liddle Feesh
2001-12-26 14:15 ` Liddle Feesh
2001-12-26 14:59 ` Michal Nowak
2001-12-26 22:20 ` Liddle Feesh
2001-12-27 8:21 ` Michael Bode
2001-12-27 10:02 ` Michal Nowak
2001-12-27 17:03 ` Liddle Feesh
2001-12-28 9:15 ` GNAT on Win2K Was: " Michal Nowak
2001-12-28 16:25 ` Alfred Hilscher
2001-12-28 17:08 ` Liddle Feesh
2001-12-26 15:08 ` Jeff Creem
2001-12-26 14:49 ` Larry Hazel [this message]
2001-12-26 22:21 ` Liddle Feesh
2001-12-27 1:19 ` Larry Hazel
2001-12-26 19:33 ` martin.m.dowie
2001-12-26 23:10 ` Why won't this package compile? - ERRORS FIXED & NEW PROBLEMS & New Source Code Listing Liddle Feesh
2001-12-27 4:21 ` Larry Hazel
2001-12-27 16:57 ` Liddle Feesh
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox