Well,
I prefer:
IF A = "TEST" THEN
GOSUB DO.SOMETHING ;* Say why
END ELSE
GOSUB DO.SOMETHING.ELSE ;* The reason
END
IMO much more readable - because you see immediately that is is a
conditional branching.
It is also easier maintainable if you want to add some more code later
or you need more conditions and want to change branching into case.
And of course it will auto-indent correctly in my editor of choice ;-).
On 20/04/2012 23:05, Kate Stanton wrote:
Rather than:
BEGIN CASE
CASE A = "TEST"; GOSUB DO.SOMETHING
CASE 1; GOSUB DO.SOMETHING.ELSE
END CASE
or
IF A = "TEST" THEN GOSUB DO.SOMETHING ELSE GOSUB DO.SOMETHING.ELSE
I prefer:
IF A = "TEST" THEN GOSUB DO.SOMETHING ;* Say why
ELSE GOSUB DO.SOMETHING.ELSE ;* The reason
lining up the GOSUBs under each other, with comment making it clear why.
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users