TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: "Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
From: Jacob Sparre Andersen <[log in to unmask]>
Date: Fri, 29 Aug 2003 13:41:39 +0200
In-Reply-To: <[log in to unmask]>
MIME-Version: 1.0
Reply-To: Jacob Sparre Andersen <[log in to unmask]>
Parts/Attachments: TEXT/PLAIN (33 lines)
Rick Duley wrote:

> I have come to the conclusion that (when writing code in
> verbose style as I encourage students to do) we need to
> standardise indenting to avoid word-wrap when printing
> list files.

I think the style guide does include advice on indenting and
wrapping code.  IIRC the advice is not to write lines longer
than 80 characters and to indent the wrapped lines with two
extra spaces.

> Take this for example:
>
> Ada.Text_Io.Put_Line(File => Log_File, Item => Event &
> Ada.Calendar.Day_Duration'Image(The_Seconds) & " - " &
> Ada.Calendar.Day_Number'Image(The_Day) &
> Ada.Calendar.Month_Number'Image(The_Month) &
> Ada.Calendar.Year_Number'Image(The_Year));

IIRC the style guide advices something like this:

Ada.Text_IO.Put_Line (File => Log_File,
                      Item => Event &
                        Ada.Calendar.Day_Duration'Image(The_Seconds) & " - " &
                        Ada.Calendar.Day_Number'Image(The_Day) &
                        Ada.Calendar.Month_Number'Image(The_Month) &
                        Ada.Calendar.Year_Number'Image(The_Year));

Jacob
--
"Very small. Go to sleep" -- monster (not drooling)

ATOM RSS1 RSS2