I have just come across the conitnue statement, I have never before seen it used at all. could someone please verify that my understanding of it is correct. Say we have this code:
Code:
for (//setup of for loop in here)
{
if (condition 1)
{
continue;
}
if (condition 2)
{
//perform some tasks
}
}
Am I correct in thinking that if condition 1 is true, the second 'if' statement will never be performed?
Also what would occur if the code was this?:
Code:
for (//setup of for loop in here)
{
if (condition 1)
{
//perform some tasks
}
if (condition 2)
{
continue;
}
}
Thanks in advance for any help given.