At least C++ allows us to declare variables in the if clause, which which is sometimes used to declare a variable that only is only visible when some condition is true:
if (MyElement *ptr=Pool->First) // block is only entered when ptr!=0
{
for (int myIndex=0;ptr;++myIndex,ptr=ptr->next)
{
}
}
// ptr is out of scope now.
This could be a method to limit the scope of ptr and index, while maintaining readability.