X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=adoc%2Fp_number.adoc;h=d3bcce5890e329c5335d61371ebbc300e4e82d2e;hb=bfb48545dd4310c422007dfc1dc3b9eb2897d125;hp=94d5a3ca7dbe1163ef7b80f7033b9c7090b5c3e1;hpb=b7da3f7bbd1cb10241163abdb950472e539e796d;p=rrq%2Frrqforth.git diff --git a/adoc/p_number.adoc b/adoc/p_number.adoc index 94d5a3c..d3bcce5 100644 --- a/adoc/p_number.adoc +++ b/adoc/p_number.adoc @@ -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 +<> 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 +<> base, then digits 0-9 and, if in <> +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 ) ---- - +====