TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show HTML Part by Default
Show All Mail Headers

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

Print Reply
Subject:
From:
Jacob Sparre Andersen <[log in to unmask]>
Reply To:
Jacob Sparre Andersen <[log in to unmask]>
Date:
Fri, 29 Aug 2003 13:41:39 +0200
Content-Type:
TEXT/PLAIN
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