Using Visual Studio as a code formatter


hi all
this not question, rather answer question.

i have large program, me atleast. has many nested ifs , other blocks. got more , more confused blocks ended. indenting code helps, sloppy indenting not. , commenting blocks { makes more difficult. so, tried copy paste code visual studio 2008 c++ file. , arduino ide.

in visual studio there in edit/advanced menu, interesting choices. somehow managed code indented. (start "select all".) i'll check better next time need it.

now code easier follow in arduino ide too.

have comments. better ways this.

well @ least hope helps one.

quote
...any comments...


ummm...

see http://www.arduino.cc/en/guide/environment.  scroll down tools , see auto format.

or...

in arduino ide on tools dropdown menu, click on auto format.  it tell mismatched brackets (among other things) , (maybe) make easier spot kinds of block errors.

i don't it, tend make indentation more consistent.  for other trivial test programs, (usually) use external editor (gvim on linux) autoindent in customizable way.  (for example: when print out programs, blocks indented 4 spaces, not two, arduino gives.)  for lot (a lot)more formatting options. use gnu indent utility program.. "comes territory" on linux distributions, , install gnu compilers , lots of linux-like utilities cygwin on windows xp workstations.


regards,

dave


Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > Using Visual Studio as a code formatter


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums