[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
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 goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
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.

834 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