as i could figure out from those lines : the IF works like this
IF(Condition True, Do/Evaluate this, Else Do/Evaluate this)
.
and for the Double IF:
If (Condition 1 is true,
the expression to evaluate is the seond one beginning by another IF ....)
it is like
if( Cond1 ....)
if( Cond2 ....)