JonnyIlRosso
JonnyIlRosso

Reputation: 51

Indention in C++ Builder

In C++ Builder, how can I make sure that even correctly nested code like:

void func () {

...
..

)

C++ Builder correctly nested only doing so:

void func ()

{

...
...

}

This is very stressful, because I always have to correct by hand. So how can I make which indents code as well in the first instance?

Upvotes: 5

Views: 3327

Answers (4)

NCP
NCP

Reputation: 59

I am using this free tools:

http://www.cnpack.org/index.php?lang=en

using tabs to shift marked blocks to left or right.

Upvotes: 1

user1238477
user1238477

Reputation: 91

Select the block, then press CTRL+SHIFT+I. This is in Borland C++ 6.

Upvotes: 2

David Dean
David Dean

Reputation: 2632

The code formatter in C++Builder 2010 should do this automatically for you. (It is invoked with CTRL-D) You’ll have to set the preferences to how you like your code to be formatted, but this is a real time saver new with this most recent release.

Upvotes: 3

Glen
Glen

Reputation: 22320

I don't have a copy of this to run, but the documentation mentions "Indentation, Spaces, and Line breaks" as some of the options under the formatter tab of the "Tools > Options" dialog.

What you're looking for is probably under the "Line Breaks" section.

Upvotes: 0

Related Questions