Closed badiku closed 1 month ago
Miniscript allows continuous judgment. (Like python)
For 1 < 2 > 1
, it's same as 1 < 2 and 2 > 1
.
how about this code:
> 1<2>1<2>1<2>1
1
> 1<2>1
1
> 2>1<2
1
> (1<2>1)<(2>1<2)>1
0
Same.
1 < 2 > 1 < 2 > 1 < 2 > 1
will be 1 < 2 and 2 > 1 and 1 < 2 and 2 > 1 and 1 < 2 and 2 > 1
, which is true
(as known as 1
).
As for (1 < 2 > 1) < (2 > 1 < 2) > 1
, 1 < 2 > 1
is 1
, 2 > 1 < 2
is 1
, so it's the same as 1 < 1 > 1
, which is flase
(as known as 0
)
> (a<b<c)<d
1
> a<(b<c<d)
0
> (a<b)<(c<d)
0
> a<b<c<d
1
>
can I use a<b<c<d
to ensure that a<b and b<c and c<d
?
of course
All working as intended and documented.
...and @badiku, please do not use GitHub Issues to discuss things you don't understand about MiniScript. Join the MiniScript Discord server and discuss there, or send email to the support address. Help us keep GitHub issues clean. Thank you!
feature?