Print

Print


From: "Stephen Leake" <[log in to unmask]>

> Pascal Obry <[log in to unmask]> writes:
>
> > I really prefer :
> >
> >  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));
> >
> > You do not have to parse the whole line to see what operator is used
> > between lines.
>
> Hmph. _Everybody_ knows that the operator goes at the end of the line,
> not the beginning :).

Well, I used to agree with this. But then somebody made the interesting point
that if a statement starts with what would otherwise be a blatantly illegal
character, then it must be a continuation.

To me, that makes it easier to read. You can look at a line in isolation and
tell it is a continuation.

Contrast with this line, for example:

>          Ada.Calendar.Year_Number'Image(The_Year));

It's not as immediately clear whether this line is a continuation.

I think I saw this suggestion in a C or C++ newsgroup somewhere. No telling
where you can find good ideas sometimes :-)

-- Frank Manning