[HELP] Commands Again...
#5

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.
[...]
The above is from the Pawn Language Guide, discussing error 217, which is loose indentation.

Here is an example of a badly indented code:
pawn Код:
public SomeCallBack(something, something2)
{
      if (SomeFunction(something) > 10)
 {
   SomeThing(something2);
  }
   else DoWhatever();
}
and here is the correct version of the above code:
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
Reply


Messages In This Thread
[HELP] Commands Again... - by Smiths - 13.09.2009, 14:10
Re: [HELP] Commands Again... - by Smiths - 13.09.2009, 14:36
Re: [HELP] Commands Again... - by Clavius - 13.09.2009, 14:37
Re: [HELP] Commands Again... - by Smiths - 13.09.2009, 18:39
Re: [HELP] Commands Again... - by Clavius - 13.09.2009, 19:48

Forum Jump:


Users browsing this thread: 1 Guest(s)