mercredi 29 août 2018

shoud I use 2 if's ou 1 AND operator?

My question is, what's the best way to verify two conditions?

In this case the conditions are not very long but what's the best pratice? Should I create 2 if's or should I use the AND (&&) operator?

Example:

if ( A > X AND  A > Y)
    code here...
ENDIF

Ou:

if ( A > X )
    if ( A > Y)
         code here...
    ENDIF
ENDIF

Aucun commentaire:

Enregistrer un commentaire