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,e9f0eae6d714d11c X-Google-Attributes: gid103376,public From: Robert A Duff Subject: Re: Gnat pretty printing Date: 1998/12/12 Message-ID: #1/1 X-Deja-AN: 421386070 Sender: bobduff@world.std.com (Robert A Duff) References: <74lt16$9r0@romeo.logica.co.uk> <366E9E44.AA7370C7@pwfl.com> <74on70$m9o$1@cnn.Princeton.EDU> <36714049.2C5CE298@pwfl.com> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1998-12-12T00:00:00+00:00 List-Id: Marin David Condic 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.