<div dir="ltr">On Mon, Jan 21, 2013 at 7:23 PM, Karl Rupp <span dir="ltr"><<a href="mailto:rupp@mcs.anl.gov" target="_blank">rupp@mcs.anl.gov</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Things like<br>
<br>
if (y < 12) {ierr = Something(); CHKERRQ(ierr);}<br>
<br>
don't match the standard but …. am I being too picky? I believe<br>
the PETSc make uncrustify rule would move that to separate lines.<br>
<br>
<br>
I expect that it's a lot easier to define a rule where '{' opens a<br>
new block on the next line rather than having a 'sometimes it's a<br>
single line'-type of exception.<br>
<br>
<br>
Yes, though<br>
<br>
if (y < 12) {<br>
ierr = Something();CHKERRQ(ierr);<br>
}<br>
<br>
takes three times as many lines. I don't care much either way, but it's<br>
nice to not waste vertical space.<br>
</blockquote>
<br></div>
But, unfortunately, it is also a good example of why uncrustify-like tools have a hard time with PETSc:<div class="im"><br>
<br>
if (y < 12) {<br>
ierr = Something();<br></div>
call_other_function(ierr);<br>
}<br>
<br>
is semantically very much the same to a parser, yet it should lead to different formatting.<br></blockquote><div><br></div><div style>Its my belief that tools are there to help us do the things we want to do, not to determine what we do.</div>
<div style><br></div><div style> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Best regards,<br>
Karli<br></blockquote></div><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener
</div></div>