0

Are you aware of any tool or program that is able to beautify the function input parameters making the variable left-aligned like the example below?

I am having a look at A-Style right now. Do you know if it can do that job for me?

I would like to change from this code

      void foo(
         int a
         ,my_long_parameter b
         ,anotgher_type c
      );

to these one.

      void foo(
         int                 a
         ,my_long_parameter  b
         ,anotgher_type      c 
      );
BЈовић
  • 62,405
  • 41
  • 173
  • 273
Abruzzo Forte e Gentile
  • 14,423
  • 28
  • 99
  • 173
  • That's a weird code style! (Or rather, a code style that I've never encountered before.) – Oliver Charlesworth Jan 20 '12 at 11:12
  • I had a look but could not find anything. Unless you work alone you may want to negotiate with your coworkers before in any case. Some will hate it. It takes up a lot of space and makes it harder to see which variable is of which type. Consider that when using templates some type expressions can be really long. Also, you may want to put the , at the end of lines. – Johan Lundberg Jan 20 '12 at 11:14
  • The second function comes form Google. – Abruzzo Forte e Gentile Jan 20 '12 at 12:40

1 Answers1

1

Take a look into astyle. It does what you want (and more), but you have to set parameters.

BЈовић
  • 62,405
  • 41
  • 173
  • 273