The following examples are written in pseudo code.
Is this:
if (!b){
b = a;
} else if (b === a){
b = 0;
} else {
a = b;
}
essentially the same as:
if (!b){
b = a;
} else {
if (b === a){
b = 0;
} else {
a = b;
}
}
If they are the same, why is every language design has them the same instead of just the second code block?
If they are not the same, in what situation will the difference actually impact the code?
The second example shows clearer tree than the first example, isn't it?
Aucun commentaire:
Enregistrer un commentaire