Commit f24f0a3f authored by anton's avatar anton

renamed NUMBER? into (NUMBER?) (Reason: NUMBER? is defined differently in F83)

parent 36b4ddb7
...@@ -191,7 +191,7 @@ Create bases 10 , 2 , A , 100 , ...@@ -191,7 +191,7 @@ Create bases 10 , 2 , A , 100 ,
1+ 1+
THEN ; THEN ;
: number? ( string -- string 0 / n -1 / d 0> ) : (number?) ( string -- string 0 / n -1 / d 0> )
dup >r count snumber? dup if dup >r count snumber? dup if
rdrop rdrop
else else
...@@ -199,13 +199,15 @@ Create bases 10 , 2 , A , 100 , ...@@ -199,13 +199,15 @@ Create bases 10 , 2 , A , 100 ,
then ; then ;
: number ( string -- d ) : number ( string -- d )
number? ?dup 0= abort" ?" 0< (number?) ?dup 0= abort" ?" 0<
IF IF
s>d s>d
THEN ; THEN ;
[THEN] [THEN]
[IFUNDEF] (number?) : (number?) number? ; [THEN]
\ this provides assert( and struct stuff \ this provides assert( and struct stuff
\GFORTH [IFUNDEF] assert1( \GFORTH [IFUNDEF] assert1(
\GFORTH also forth definitions require assert.fs previous \GFORTH also forth definitions require assert.fs previous
...@@ -2535,7 +2537,7 @@ Cond: MAXI ...@@ -2535,7 +2537,7 @@ Cond: MAXI
IF nip execute-exec-compile ELSE gexecute THEN IF nip execute-exec-compile ELSE gexecute THEN
EXIT EXIT
THEN THEN
number? dup (number?) dup
IF 0> IF swap lit, THEN lit, discard IF 0> IF swap lit, THEN lit, discard
ELSE 2drop restore-input throw Ghost gexecute THEN ; ELSE 2drop restore-input throw Ghost gexecute THEN ;
......
...@@ -113,7 +113,7 @@ Defer source ( -- c-addr u ) \ core ...@@ -113,7 +113,7 @@ Defer source ( -- c-addr u ) \ core
\ \ Number parsing 23feb93py \ \ Number parsing 23feb93py
\ number? number 23feb93py \ (number?) number 23feb93py
hex hex
const Create bases 0A , 10 , 2 , 0A , const Create bases 0A , 10 , 2 , 0A ,
...@@ -210,7 +210,7 @@ has? os 0= [IF] ...@@ -210,7 +210,7 @@ has? os 0= [IF]
1+ 1+
THEN ; THEN ;
: number? ( string -- string 0 / n -1 / d 0> ) : (number?) ( string -- string 0 / n -1 / d 0> )
dup >r count snumber? dup if dup >r count snumber? dup if
rdrop rdrop
else else
...@@ -218,7 +218,7 @@ has? os 0= [IF] ...@@ -218,7 +218,7 @@ has? os 0= [IF]
then ; then ;
: number ( string -- d ) : number ( string -- d )
number? ?dup 0= abort" ?" 0< (number?) ?dup 0= abort" ?" 0<
IF IF
s>d s>d
THEN ; THEN ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment