comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@world.std.com>
Subject: Re: Gnat pretty printing
Date: 1998/12/12
Date: 1998-12-12T00:00:00+00:00	[thread overview]
Message-ID: <wcclnke40st.fsf@world.std.com> (raw)
In-Reply-To: 36714049.2C5CE298@pwfl.com

Marin David Condic <condicma@bogon.pwfl.com> writes:

>     procedure Pop (
>         Item            :    out Element_Ptr_Type ;
>         List            : in out List_Type) is
>         --
>         Temp            : Link_Type         := null ;

Why do you like the colon after Temp to line up with the colons in the
parameter list?  Temp is local, and has nothing to do with the
parameters, so why make it look similar?  And why should the ":= null"
line up with the "is"?

>     begin
>         pragma Debug (
>             Ada.Text_IO.Put_Line (
>                 File    => Ada.Text_IO.Current_Error,
>                 Item    => "UTIL.Tagged_Lists.Pop: ")) ;
>         if (List.Length <= 0) then
>             raise Underflow ;
>         end if ;
>         Temp            := List.First ;
>         --
>         List.First      := List.First.Next ;
>         List.Current    := List.First ;
>         List.Length     := List.Length - 1 ;
>         List.Memory     := List.Memory -

And why do all these ":=" line up?

>             ((Temp.all'Size / System.Storage_Unit) +
>                 (Temp.Value.all'Size / System.Storage_Unit)) ;
>         if (List.First = null) then
>             --
>             --  Empty list.
>             --
>             List.Last       := null ;

What's the purpose of the extra space there?

>         end if ;
>         --
>         Item    := Temp.Value ;
>         Dispose (
>             X	=> Temp) ;

Why two lines for the Dispose?

>     exception
>         when Storage_Error =>
>             pragma Debug (
>                 Ada.Text_IO.Put_Line (
>                     File    => Ada.Text_IO.Current_Error,
>                     Item    => "UTIL.Tagged_Lists.Pop: Storage_Error."))
> ;

And why extra space there?  And why ";" on the next line?
Maybe that's just an accident of posting software.

- Bob
-- 
Change robert to bob to get my real email address.  Sorry.




  reply	other threads:[~1998-12-12  0:00 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-09  0:00 Gnat pretty printing Matt Tyler
1998-12-09  0:00 ` Tom Moran
1998-12-09  0:00   ` dennison
1998-12-09  0:00     ` Tom Moran
1998-12-09  0:00 ` David C. Hoos
1998-12-09  0:00 ` Steve O'Neill
1998-12-10  0:00   ` okellogg
1998-12-11  0:00     ` dewarr
1998-12-09  0:00 ` dennison
1998-12-09  0:00 ` Marin David Condic
1998-12-09  0:00   ` David C. Hoos
1998-12-10  0:00   ` Martin C. Carlisle
1998-12-11  0:00     ` Michael F Brenner
1998-12-11  0:00       ` Stephane Barbey
1998-12-11  0:00       ` dewarr
1998-12-11  0:00       ` Bob Collins
1998-12-11  0:00       ` Bryce Bardin
1998-12-11  0:00     ` Marin David Condic
1998-12-12  0:00       ` Robert A Duff [this message]
1998-12-13  0:00         ` Ehud Lamm
1998-12-15  0:00         ` Marin David Condic
1998-12-12  0:00       ` Simon Wright
1998-12-14  0:00         ` dennison
1998-12-15  0:00         ` Marin David Condic
1998-12-15  0:00           ` Matthew Heaney
1998-12-15  0:00             ` Marin David Condic
1998-12-19  0:00               ` Lieven Marchand
1998-12-15  0:00           ` dennison
1998-12-15  0:00             ` Marin David Condic
1998-12-16  0:00               ` Matthew Heaney
1998-12-16  0:00               ` dennison
1998-12-16  0:00                 ` Matthew Heaney
1998-12-16  0:00                 ` Chris Morgan
1998-12-18  0:00                   ` dewar
1998-12-17  0:00                 ` Dale Stanbrough
1998-12-14  0:00     ` Robert I. Eachus
1998-12-21  0:00     ` BARDIN Marc
replies disabled

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