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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6401d8e669ccd293 X-Google-Attributes: gid103376,public From: Robert A Duff Subject: Re: How can i print the element poped from a generic STACK Date: 2000/11/07 Message-ID: #1/1 X-Deja-AN: 690823698 Sender: bobduff@world.std.com (Robert A Duff) References: <3A0806E8.B72D569@hotmail.com> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 2000-11-07T00:00:00+00:00 List-Id: jordan writes: > package stackOfInt is new STACK(100, INTEGER); > use stackOfInt; > > package INT_IO is new TEXT_IO.INTEGER_IO(INTEGER); > use INT_IO; > > i : Integer; > > begin > > > stackOfInt.push(20); > > Put(stackOfInt.pop(i)); <------------- error!!! First call the Pop *procedure*, which will put its result in I. Then print I. I recommend using 'Image, rather than Text_IO.Integer_IO, to do the formatting. - Bob