comp.lang.ada
 help / color / mirror / Atom feed
* gnatpp parameter alignment
@ 2018-11-28  0:34 julian.fondren
  2018-11-28  7:37 ` briot.emmanuel
  2018-11-28  9:02 ` Simon Wright
  0 siblings, 2 replies; 7+ messages in thread
From: julian.fondren @ 2018-11-28  0:34 UTC (permalink / raw)


Hello comp.lang.ada,

I thought I'd always use gnatpp for styling, but I've found this
formatting result that I don't like at all, and which seems to come up
a lot in my code (so often that !pp formatting escapes would be a
pain):

   function waitpid (Pid : Integer; Wstatus : System.Address;
      Options            : Integer) return Integer;

What I'd prefer is that, if parameters take up more than one line,
that they just switch to an entirely vertical formatting, something
like:

   function waitpid (Pid     : Integer;
                     Wstatus : System.Address;
                     Options : Integer) return Integer;

or

  function waitpid
    ( Pid     : Integer;
      Wstatus : System.Address;
      Options : Integer) return Integer;

Many other variations would be acceptable, as long as there aren't
multiple parameters on a line and *also* parameters across multiple
lines, especially with that long-distance horizontal alignment that
makes "Options" look like it's unrelated to the function definition
around it.

I've looked through gnatpp's flags and didn't find anything for
this. I like horizontal alignment in general, and I can deal with most
of the rest of gnatpp's results, so I don't want to turn off huge
swaths of gnatpp formatting. I just want this one case to not visually
suggest that a three-argument function has only two arguments.

Thanks.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-11-28 14:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-28  0:34 gnatpp parameter alignment julian.fondren
2018-11-28  7:37 ` briot.emmanuel
2018-11-28  7:56   ` Mark Lorenzen
2018-11-28  8:42   ` Simon Wright
2018-11-28  9:02 ` Simon Wright
2018-11-28 13:50   ` Simon Wright
2018-11-28 14:19   ` julian.fondren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox