comp.lang.ada
 help / color / mirror / Atom feed
From: "Nick Roberts" <Nick.Roberts@dial.pipex.com>
Subject: Re: urgent help needed!!!
Date: 1997/03/31
Date: 1997-03-31T00:00:00+00:00	[thread overview]
Message-ID: <01bc3dcf$fc3222c0$85fe82c1@xhv46.dial.pipex.com> (raw)
In-Reply-To: 859690935.9677@dejanews.com




In reply to the urgent plea of yus000@unbc.edu in article
<859690935.9677@dejanews.com>, my reply is as follows.

Dear YUS,

Looking at your code, I can spot a few simple errors. Look carefully at
your implementation of Push, it doesn't quite do what is required. Also,
look again at the parameter mode for Print. You have forgotten to decrement
Count in Pop.

Otherwise, your code looks very good (if a little messy, perhaps :-). 

I must confess, I cannot see why the compiler should be giving you the
error message it does. All I can think of is that a previous version of
Ordered_Stack is in the library [and this has a different definition of the
type Stack which is indefinite (so that an object of the type could not
be declared)]. Certainly the type Stack as declared in the code you show is
a definite type.

So, the answer may be to try a 'full rebuild'. Failing this, you may wish
to try deleting the library units Ordered_Stack specification and body from
the library, and then rebuilding.

Also, remember that the order in which you present units to the compiler in
a single source text file is the order in which they are going to be
compiled. If you have all three units presented in your posting in one
file, you should either split them into separate files (recommended), or
rearrange them so they occur in the following order: Ordered_Stack
(specification); Ordered_Stack (body); Main.

Finally, delete the 'testorder' procedure, it's doing you no good.

Remember: Ada programmers are the BEST programmers!

Nick.






  parent reply	other threads:[~1997-03-31  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-03-29  0:00 urgent help needed!!! yus000
1997-03-31  0:00 ` Robert Dewar
1997-03-31  0:00 ` Nick Roberts [this message]
     [not found]   ` <01bc3dd0$ff5bf600$7e0464c3@edi-c>
1997-03-31  0:00     ` Nick Roberts
1997-04-01  0:00 ` Larry Kilgallen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox