Solved

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

Posted on 2004-04-23
5
207 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

730 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