* I think I'm going to learn something
@ 2007-11-09 16:31 andrew
2007-11-09 16:52 ` Pascal Obry
0 siblings, 1 reply; 3+ messages in thread
From: andrew @ 2007-11-09 16:31 UTC (permalink / raw)
I have a situation I don't understand. Here is my example:
package X
procedure in_order(root: node_ptr; count: integer := 0);
procedure post_order(root: node_ptr; count: integer := 0);
...
end X;
package body X
procedure in_order(root: node_ptr; count: integer := 0) is
....
begin
....
end in_order;
procedure post_order(root: node_ptr; count: integer := 0) is
....
begin
....
end post_order
end X;
Now, I have a main procedure that calls post_order but the output is
the output that was written in the in_order procedure. Hmmm........I
don't get it.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: I think I'm going to learn something
2007-11-09 16:31 I think I'm going to learn something andrew
@ 2007-11-09 16:52 ` Pascal Obry
2007-11-09 16:58 ` andrew
0 siblings, 1 reply; 3+ messages in thread
From: Pascal Obry @ 2007-11-09 16:52 UTC (permalink / raw)
To: andrew
andrew a �crit :
> Now, I have a main procedure that calls post_order but the output is
> the output that was written in the in_order procedure. Hmmm........I
> don't get it.
???? you have a bug in post_order procedure !
Pascal.
--
--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: I think I'm going to learn something
2007-11-09 16:52 ` Pascal Obry
@ 2007-11-09 16:58 ` andrew
0 siblings, 0 replies; 3+ messages in thread
From: andrew @ 2007-11-09 16:58 UTC (permalink / raw)
> ???? you have a bug in post_order procedure !
Yep. Sure do. Found it about 30 seconds after posting my message.
Well, it's not technically a bug, it's a typo. I copied code out of
the in_order procedure to use/alter for the post_order procedure.
When I did that I never changed the recursive calls to in_order to be
recursive calls to post_order withing the post_order procedure. So
post_order recursively called in_order and gave me the in_order output
with the post_order order.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-11-09 16:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-09 16:31 I think I'm going to learn something andrew
2007-11-09 16:52 ` Pascal Obry
2007-11-09 16:58 ` andrew
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox