One line is my preference as well. For me, it all comes down to readability, and when one line is visually concise I do that. If the condition inside the () is cumbersome and might even force the action conditionally executed onto a continuation line, then I might write it the other way. Also, in the case of a string of multiple IF statements that are independent (not involving ELSE), if most of the IFs have multiple statements conditionally executed then I might code a single-line IF as IF () THEN.
I think all you can hope to do is state the case for each way, and then stick with one way in the examples. Of course, if you are taking the position that the standard ought to be changed so that any IF must have a THEN and END IF, then you must argue that way (but then you wouldn't be asking for our opinions).
Dick Russell
-----Original Message-----
From: Fortran 90 List [mailto:[log in to unmask]]On Behalf
Of John Appleyard
Sent: Thursday, September 02, 2004 7:27 AM
To: [log in to unmask]
Subject: Re: Style question
essentially one line if statements.
I prefer the original one line version - because it is just one line.
Other things being equal, I find textually smaller programs easier to
read.
--
JA
-----------------------------------------
*****************Internet Email Confidentiality Footer******************
Privileged/Confidential Information may be contained in this message.
If you are not the addressee indicated in this message (or responsible
for delivery of the message to such person), you may not copy or deliver
this message to anyone. In such case, you should destroy this message
and notify the sender by reply email. Please advise immediately if you
or your employer do not consent to Internet email for messages of this
kind. Opinions, conclusions and other information in this message that
do not relate to the official business of The Shaw Group Inc. or its
subsidiaries shall be understood as neither given nor endorsed by it.
________________________________________________________________________
The Shaw Group Inc.
http://www.shawgrp.com
|