Mime-Version: |
1.0 |
Sender: |
|
Subject: |
|
From: |
|
Date: |
Thu, 28 Aug 2003 13:54:58 +0800 |
Content-Type: |
text/plain; charset="us-ascii"; format=flowed |
X-To: |
|
Reply-To: |
|
Parts/Attachments: |
|
|
Hi all
Is there any move afoot to review the Ada Style Book?
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. 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));
As you can see, it gets a bit unwieldy :) Much better, in my opinion, to
realign it thus:
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));
which gives you a fair chance of getting it all on a page without
word-wrap. I can't see that this sort of thing is covered by the standard
and it would be nice if the people who devise the "reformat" routines for
IDEs had something standard to work to.
Comments, anyone?
--------------------------------------------
Rick Duley
School of Engineering Science
Murdoch University, Perth, Western Australia
aussie : 0409 106 049
o'seas : +61 409 106 049
.-_|\
/ \
perth *_.-._/
v
"It is not enough to do your best:
you must know what to do,
and THEN do your best."
(W Edwards Deming)
|
|
|