dimanche 1 septembre 2019

Is a compound statement always 1 block?

The if compound statement is 1 block. A compound statement consists of 0 or more statements

Now if you have

if (expression) {
    // do something
}
else {
    // do something else
}

Is it one compound statement or two? 1 compound statement = 1 block? Just because the 2 blocks seem to belong together.

Aucun commentaire:

Enregistrer un commentaire