13.09.2009, 19:48
Quote:
Originally Posted by Pawn Language Guide
217
Loose Indentation Statements at the same logical level do not start in the same column; that is, the indents of the statement are different. Although PAWN is a free format language, loose indentation frequently hides a logical error in the control flow. [...] |
Here is an example of a badly indented code:
pawn Код:
public SomeCallBack(something, something2)
{
if (SomeFunction(something) > 10)
{
SomeThing(something2);
}
else DoWhatever();
}
pawn Код:
public SomeCallBack(something, something2)
{
if (SomeFunction(something) > 10)
{
SomeThing(something2);
}
else DoWhatever();
}
pawn Код:
// logical level 0
// logical level 1
// logical level 2
// logical level 1
// etc