more and better documentation and some reorganisation
[rrq/rrqforth.git] / adoc / p_within.adoc
index 3d7ea491c79b35ac3ba44c77d167c3cf42a512f3..911325f0fff828e8d985e038dafb722869b78b1b 100644 (file)
@@ -1,9 +1,21 @@
+// logic.asm:  WORD p_within, 'WITHIN',fasm
+
 anchor:p_within[]
 
-Word: WITHIN
-----------
+=== Word: WITHIN
+
+....
+Data stack: ( v lo hi -- 0/-1
+....
 
+"WITHIN" is a function word that replaces a triple of values with -1
+of the the first, v, is within the value range spanned by the second,
+lo, inclusive and third, hi, exclusive.
+
+====
+.Word: WITHIN
+[caption='Definition concept {counter:exec}: ']
 ----
-logic.asm:     WORD p_within, 'WITHIN',fasm
+: WITHIN 2 PICK > ROT ROT <= AND ;
 ----
-
+====