vendredi 13 octobre 2017

Are there a names for this condition patterns?

There are two ways to ensure a condition is met:

  • The simple way is using anif with the condition:

    if (condition)
    {
        /* execute code */
    }
    
    
  • The other way is similar but I check for the negated condition and return if this is given:

    if (!condition)
    {
        return;
    }
    /* execute code */
    
    

Are there names for this patterns? I tried googleing it but was not successfull...

Aucun commentaire:

Enregistrer un commentaire