1
For example can we convert the following code to a script?
if(bool_1)
{
FOO1();
if(!bool_2)
{
FOO2();
}
else
{
BAR1();
if(bool_3)
{
BAR2();
}
BAR3();
}
}
else
{
FOOBAR();
}
<push> <push> <push> OP_IF OP_FOO1 OP_NOTIF OP_FOO2 OP_ELSE OP_BAR1 OP_IF OP_BAR2 OP_ENDIF OP_BAR3 OP_ENDIF OP_FOOBAR OP_ENDIF(correct?)
If yes then:
1. Is there any limit on how deep a nested IFs can go?
2. Is there any examples (raw bytes/hex) I could look at?
IF/ELSE loopsIs "loop" the correct term to use? – Coding Enthusiast – 2019-10-08T06:22:50.860@CodingEnthusiast thanks for correcting. I wrote the answer from my phone. – Ugam Kamat – 2019-10-08T07:45:30.757