major touch-up into presentable form
[rrq/rrqforth.git] / adoc / p_number.adoc
index 94d5a3ca7dbe1163ef7b80f7033b9c7090b5c3e1..d3bcce5890e329c5335d61371ebbc300e4e82d2e 100644 (file)
@@ -1,8 +1,27 @@
-Word: NUMBER
-----------
+// compile.asm:        WORD p_number,'NUMBER',fasm
 
 anchor:p_number[]
+
+=== Word: NUMBER
+
+....
+Data stack: ( char n -- [ 0 ]/[ v 1 ] )
+....
+
+"NUMBER" is a function word that parses a text number using
+<<p_base,BASE>> as numerical base, then returns the result number and
+a 1 on top, or just a 0 if the word didn't parse.
+
+A number consists of, first an optional minus sign, if in
+<<p_decimal,DECIMAL>> base, then digits 0-9 and, if in <<p_hex,HEX>>
+base, letters a-f or A-F for values 10-15. I.e. the normal positive or
+negative decimal integers or normal (positive only) hexadecimal
+integers.
+
+====
+.Word: NUMBER
+[caption='Definition concept {counter:exec}: ']
 ----
-compile.asm:   WORD p_number,'NUMBER',fasm
+( too complex to include here )
 ----
-
+====