This is where, on a case by case basis, the programmer will know now and
possibly for the future the permanence of the code. For simple example:
IF GENDER="M" THEN PRINT "MALE" ELSE PRINT "FEMALE"
probably won't need to be altered (made multi-line) anytime in the near
future.
I've inherited a lot of code that says
IF X=1 THEN
PRINT X
END
of which I consolidate. I'm betting that it can remain as one line pretty
much forever.
My 1 cent.
Mark Johnson
----- Original Message -----
From: "Kevin King" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, September 30, 2005 1:50 PM
Subject: RE: [U2] Good Programming Practice Question.........
> >I don't mind if-then-else on one line ... as long as it fits on one
> *screen* line. :)
> >IF SOME.FLAG THEN GOSUB DO.SOMETHING ELSE GOSUB DO.SOMETHING.ELSE
>
> And I'm completely opposite, preferring a full block IF statement all
> the time. There's four different ways that IF can be structured, and
> the full block structure provides the most flexibility for maintenance
> (in my opinion, of course). Yeah, it takes more lines, but it's fewer
> lines to change when an inline IF ends up getting converted to the
> partial or full block format, and it's been my experience that
> comparison programs get more accurate results with insertions and
> deletions vs. changed lines.
>
> -K
> -------
> u2-users mailing list
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/