Home / Software / Computer programming / intendent tool?
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] - (Bottom) Print
Author Topic: intendent tool?  (Read 564 times)
Ryder17z
Topic Starter
Intermediate



Thanked: 2
Posts: 201

Computer: Specs
Experience: Experienced
OS: Windows XP



1
« on: November 19, 2009, 08:50:20 PM »

Is there any tool which can open files containing C++/Pawn code and intendent it correctly?

Very often I have to do it the manual way, which takes way too much time..

Example:

Bad Code:

Code: [Select]
OnPlayerCommandText(playerid, cmdtext[]){
if(strcmp(cmd, "/test", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
// Blah
if (PlayerInfo[playerid][pAdmin] >= 7)
{
SendClientMessage(playerid, COLOR_YELLOW, "Your an High-level administrator.");
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "Your not an administrator.");
}
}
return 1;
}
return 0;
}

Good Code:

Code: [Select]
OnPlayerCommandText(playerid, cmdtext[]){
if(strcmp(cmd, "/test", true) == 0)
{
if(IsPlayerConnected(playerid))
{
//Blah
if (PlayerInfo[playerid][pAdmin] >= 7)
{
SendClientMessage(playerid, COLOR_YELLOW, "Your an High-level administrator.");
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "Your not an administrator.");
}
}
return 1;
}
return 0;
}
IP logged

BC_Programmer
Mastermind


Thanked: 682
Posts: 15,624

Computer: Specs
Experience: Beginner
OS: Windows 7


Pinkie Pie is best pony

BC-Programming.com 1 1
« Reply #1 on: November 19, 2009, 09:30:42 PM »

I believe the term is "indent" and it's also referred to as "formatting" the code. there are tools of this sort for nearly every programming language.
IP logged

Ryder17z
Topic Starter
Intermediate



Thanked: 2
Posts: 201

Computer: Specs
Experience: Experienced
OS: Windows XP



1
« Reply #2 on: November 20, 2009, 04:57:30 AM »

Explains why I couldn't find anything...
IP logged

BC_Programmer
Mastermind


Thanked: 682
Posts: 15,624

Computer: Specs
Experience: Beginner
OS: Windows 7


Pinkie Pie is best pony

BC-Programming.com 1 1
« Reply #3 on: November 20, 2009, 05:06:42 AM »

Explains why I couldn't find anything...

:P

yeah I assumed that since you had the wrong term your google results might be a tad... skewed...  ;D
IP logged

Pages: [1] - (Top) Print 
Home / Software / Computer programming / intendent tool? « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.122 seconds with 20 queries.