Absolutely!  But if you obey the rule that a statement should have only one
purpose, you will never, ever attempt to write that on one line. :)

Oh, and one other thing ... I despise constructs like:

        IF (expr) ELSE do.something

which can *always* be written more clearly as:

        IF NOT(expr) THEN do.something

Which is why I *never* create a flag like NOT.whatever ( I also hate double
negatives :).

-Keith

----Original Message----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of George Gallen
Sent: Friday, September 30, 2005 10:35 AM
To: [email protected]
Subject: RE: [U2] Good Programming Practice Question.........

> BUT....You have to be careful that what is on the line doesn't have an
>   ELSE clause of it's own which is optional..(ie. WRITE).
> 
> IF (COND) THEN WRITE SOMETHING ON F.FILE,ID ELSE RELEASE F.FILE,ID
> 
> which needs to be
> 
> IF (CONT) THEN
>    WRITE SOMETHING ON F.FILE,ID
> END ELSE
>    RELEASE F.FILE,ID
> END
> 
> I remember once trying to figure out why my locks were never
> being released,
>   if compiled with the ELSE as a clause of then WRITE, and
> the IF with no
>   ELSE clause at all (This was on a Prime, but I don't take
> chances anymore).
> 
> George
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Keith
> W. Roberts
> Sent: Friday, September 30, 2005 1:19 PM
> To: [email protected]
> 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
> 
> -Keith
> -------
> 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/

Reply via email to