tag:blogger.com,1999:blog-8837899541977019574.post5986687462647599948..comments2022-11-16T14:41:56.197+01:00Comments on program begin end. // comments?: Writing Readable Code - Paul's Snippet - Show your formatting!Unknownnoreply@blogger.comBlogger3125tag:blogger.com,1999:blog-8837899541977019574.post-68067265207258112112008-08-07T13:24:00.000+02:002008-08-07T13:24:00.000+02:00@Jolyon: P.S. You introduced a bug in that rewrite...@Jolyon: P.S. You introduced a bug in that rewrite.Lars Fosdalhttps://www.blogger.com/profile/05635001623287214775noreply@blogger.comtag:blogger.com,1999:blog-8837899541977019574.post-46667922323905949832008-08-07T13:18:00.000+02:002008-08-07T13:18:00.000+02:00@Jolyon: could you email me the above rewrite plea...@Jolyon: could you email me the above rewrite please? I don't want to mangle your indent style :)<BR/><BR/>@All: The mentioned semi-colon has to go, or the code won't compile.Lars Fosdalhttps://www.blogger.com/profile/05635001623287214775noreply@blogger.comtag:blogger.com,1999:blog-8837899541977019574.post-3226958640263795202008-08-07T12:20:00.000+02:002008-08-07T12:20:00.000+02:00Hmmm, comments system doesn't want to allow a pre ...Hmmm, comments system doesn't want to allow a pre tag, so I don't think my indentation is going to be preserved, but I think the indentation should be clear even if it does get lost.<BR/><BR/>So here goes nothing....<BR/><BR/> procedure WhenC;<BR/> begin<BR/> if ConditionD then<BR/> code(2);<BR/> code(3);<BR/> end;<BR/><BR/> procedure WhenE;<BR/> begin<BR/> code(4);<BR/> morecode('X');<BR/> if ConditionF then<BR/> code(5)<BR/> else if ConditionG then<BR/> code(6);<BR/> end;<BR/><BR/>begin<BR/> try<BR/> if ConditionA then<BR/> Code(1)<BR/> else if NOT ConditionB then<BR/> EXIT;<BR/><BR/> if ConditionC then<BR/> WhenC<BR/> else if ConditionE then<BR/> WhenE<BR/> else<BR/> begin<BR/> code(7);<BR/> morecode('Y');<BR/> end;<BR/> finally<BR/> code(8);<BR/> end;<BR/>end;<BR/><BR/>Incidentally, Post #2 in my multicast events series is now up if you're interested. With downloadable code!<BR/><BR/>:)Jolyon Smithhttps://www.blogger.com/profile/12189834837787604468noreply@blogger.com