From e6446c3ca58908a9c3695575dab27c103855a9d4 Mon Sep 17 00:00:00 2001 From: lkcl Date: Wed, 25 Sep 2019 06:54:16 +0100 Subject: [PATCH] --- simple_v_extension/appendix.mdwn | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/simple_v_extension/appendix.mdwn b/simple_v_extension/appendix.mdwn index 24ae6ca71..aabe557be 100644 --- a/simple_v_extension/appendix.mdwn +++ b/simple_v_extension/appendix.mdwn @@ -208,18 +208,22 @@ The second is utilised to indicate where the results of each comparison are to be stored, as a bitmask. Additionally, the behaviour of the branch - when it occurs - may also be modified depending on whether the predicate "invert" and "zeroing" bits are set. +These four combinations result in "consensual branches", cbranch.ifnone (NOR), cbranch.ifany (OR), cbranch.ifall (AND), cbranch.ifnotall (NAND). * If "invert" is zero, and "zeroing" is zero, the branch will occur if and only - all tests pass + all tests pass (AND, ifall) * If "invert" is set and "zeroing" is zero, the branch will occur if all - tests *fail* (opposite of inv=0,zero=0) -* If "invert" is zero, and "zeroing" is set, the branch will occur if - even *one* test passes + tests *fail* (NAND, ifnotall) +* If "invert" is set and "zeroing" is +zero, the branch will occur if + even *one* test passes (OR, ifany) * If "invert" is set and "zeroing" is set, the branch will occur if - even *one* test fails. + even *one* test fails (NOR, ifnone) This inversion capability covers AND, OR, NAND and NOR branching based -on multiple element comparisons. Note that unlike normal computer +on multiple element comparisons. Without the full set of four, it is necessary to have two-sequence branches: one conditional, one unconditional. + +Note that unlike normal computer programming early-termination of chains of AND or OR conditional tests, the chain does *not* terminate early except if fail-on-first is set, and even then ffirst ends on the first data-dependent zero. When ffirst -- 2.30.2