Solved

Is their a code beautify feature in MS VC++ .NET v7.0

Posted on 2004-04-23
5
204 Views
Last Modified: 2010-04-01
I've seen this in Visual Foxpro and if I think long enough back, Turbo Pascal but can't seem to find it (it's probably there but I just don't know where to look).

I keep looking for something like:  Tools, Code Beautify and it will format my code to my preferences.
0
Comment
Question by:djma
  • 3
5 Comments
 
LVL 14

Accepted Solution

by:
wayside earned 20 total points
ID: 10902228
Edit->Advanced->Format Selection

will pretty up the selected area of your code.

0
 
LVL 14

Expert Comment

by:wayside
ID: 10902344
I should add that you get very little control over how the code is reformatted, other than indenting.

For example, I've seen other beautifiers let you set things like:
- put the opening { at the end of the line or on a new line
- add or remove spaces between and function and the ( that starts the arguments, and the arguments themselves; for example, max(a,b) or max (a, b)
- control spacing in for statements; for (i=0;i<10;i++) or for( i = 0; i < 10; i++ )
- etc etc etc.

You don't get any goodies like this using Visual Studio's built in code formatter.
0
 

Author Comment

by:djma
ID: 10902803
No, but it seemed to do the trick with respect to some basic indentation.  I stayed away from the Edit->Advanced tab because I am only a novice...it should be under novice!    I noticed there is some software to do this but I wanted to do it from the IDE - anyway, this works for now.

Thanks for you help again, Wayside.

0
 
LVL 14

Expert Comment

by:wayside
ID: 10902909
It should have been

Edit->ReallyUsefulFunctionsWeCouldn'tDecideWhereElseToPut,

because there are some nice functions in there, which I don't think are that advanced, just really useful. :)
0
 
LVL 30

Expert Comment

by:Axter
ID: 10910671
Also just press Alt-F8

By pressing Alt-F8 that will also reformat the code.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now