Help Required (Using while loop)

Hi There
There is an application “While --> EndWhile” which can be used in extensions.conf. But I could not find any help (code help) to use this. Can any one please write a short code to show its syntax. I actually want to do this

nCounter=1;
while(nCounter<4)
{
     Perform some task;
     nCounter++;
}

Thanks