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=3.8 required=5.0 tests=BAYES_00,INVALID_MSGID, RATWARE_MS_HASH,RATWARE_OUTLOOK_NONAME autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,334540b5fc3dada1 X-Google-Attributes: gid103376,public From: "Nick Roberts" Subject: Re: urgent help needed!!! Date: 1997/03/31 Message-ID: <01bc3dcf$fc3222c0$85fe82c1@xhv46.dial.pipex.com>#1/1 X-Deja-AN: 229623308 References: <859690935.9677@dejanews.com> Organization: UUNet PIPEX server (post doesn't reflect views of UUNet PIPEX) Newsgroups: comp.lang.ada Date: 1997-03-31T00:00:00+00:00 List-Id: 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.