1
0
mirror of https://github.com/bitcoinbook/bitcoinbook synced 2024-11-26 18:08:31 +00:00

fix double negative in example

the double negative changes the example output to 13 instead of the expected 7
This commit is contained in:
Chris McBride 2018-04-04 17:59:58 -04:00 committed by GitHub
parent f8b883dcd4
commit db6370b735
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -446,7 +446,7 @@ As we saw in the step-by-step example in <<simplemath_script>>, when this script
image::images/mbc2_0604.png["TxScriptSimpleMathExample"] image::images/mbc2_0604.png["TxScriptSimpleMathExample"]
[role="pagebreak-before"] [role="pagebreak-before"]
The following is a slightly more complex script, which calculates ++2 + 7 -- 3 + 1++. Notice that when the script contains several operators in a row, the stack allows the results of one operator to be acted upon by the next operator: The following is a slightly more complex script, which calculates ++2 + 7 - 3 + 1++. Notice that when the script contains several operators in a row, the stack allows the results of one operator to be acted upon by the next operator:
---- ----
2 7 OP_ADD 3 OP_SUB 1 OP_ADD 7 OP_EQUAL 2 7 OP_ADD 3 OP_SUB 1 OP_ADD 7 OP_EQUAL