jeudi 16 juin 2016

dependent chained-up if-statements [duplicate]

This question already has an answer here:

Let's take this C-code example:

int ID = 0;
if(  (Check(&ID) == ERROR) 
   ||(ID == -1)
){
   return ERROR;
}

Do you have any guarantee that (Check(&ID) == ERROR) is checked before (ID == -1) ?

(ID = -1 would be an error-state, set by the function Check)

Aucun commentaire:

Enregistrer un commentaire