Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2004-04-23
5
Medium Priority
?
210 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 80 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
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 use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
Suggested Courses

618 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