5
In bitcoin, you can create a script like this:
OP_1 OP_IF OP_RETURN OP_ENDIF
But could you place another if statement inside the first?
OP_1 OP_IF OP_1 OP_IF OP_RETURN OP_ENDIF OP_ENDIF
I grant that this is a bit of a silly example (given that the whole thing could be replaced with OP_RETURN) but is that a valid script?
1Indeed, you can have multiple OP_ELSE's. Each one inverts the meaning, so <a IF b ELSE c ELSE d ENDIF e> is equivalent to <a IF b d ELSE c ENDIF e>. – Pieter Wuille – 2014-01-26T11:00:45.420