From: tmoran@bix.com
Subject: Re: Ada Queue
Date: 2000/04/08
Date: 2000-04-08T00:00:00+00:00 [thread overview]
Message-ID: <cxMH4.742$uE2.267823@news.pacbell.net> (raw)
In-Reply-To: K77H4.420$Qy3.109906@news.pacbell.net
Renaming and rearranging, you get the more Ada-ish, and IMHO clearer:
procedure Enqueue(Q: in out Queue; E : Element_type) is
Cursor : Queue;
begin
if Q = null then
Q := new QueueNode'(Data=>E, Rest=>null);
else
Cursor := Q;
while Cursor.Rest /= null loop
Cursor := Cursor.Rest;
end loop;
Cursor.Rest := new QueueNode'(Data=>E, Rest=>null);
end if;
end Enqueue;
next prev parent reply other threads:[~2000-04-08 0:00 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-04-06 0:00 Ada Queue Joseph T.
2000-04-06 0:00 ` Ted Dennison
2000-04-06 0:00 ` Joseph T
2000-04-06 0:00 ` Robert Dewar
2000-04-06 0:00 ` Joseph T
2000-04-07 0:00 ` Ole-Hjalmar Kristensen
2000-04-06 0:00 ` Ted Dennison
2000-04-06 0:00 ` Ted Dennison
2000-04-06 0:00 ` Joseph T.
2000-04-07 0:00 ` Ole-Hjalmar Kristensen
2000-04-07 0:00 ` Joseph T
2000-04-07 0:00 ` Ted Dennison
2000-04-07 0:00 ` Ted Dennison
2000-04-07 0:00 ` Hyman Rosen
2000-04-06 0:00 ` tmoran
2000-04-08 0:00 ` tmoran [this message]
2000-04-07 0:00 ` MaggieJohn
2000-04-07 0:00 ` Ted Dennison
2000-04-07 0:00 ` Simon Wright
2000-04-09 0:00 ` Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox