The Lambda Lab
/
projects
/
scheme.forth.jl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
string->number works.
[scheme.forth.jl.git]
/
scheme.4th
diff --git
a/scheme.4th
b/scheme.4th
index
ecbb91b
..
19848b6
100644
(file)
--- a/
scheme.4th
+++ b/
scheme.4th
@@
-393,8
+393,11
@@
parse-idx-stack parse-idx-sp !
: minus? ( -- bool )
nextchar [char] - = ;
: minus? ( -- bool )
nextchar [char] - = ;
+: plus? ( -- bool )
+ nextchar [char] + = ;
+
: fixnum? ( -- bool )
: fixnum? ( -- bool )
- minus? if
+ minus?
plus? or
if
inc-parse-idx
delim? if
inc-parse-idx
delim? if
@@
-493,8
+496,11
@@
parse-idx-stack parse-idx-sp !
nextchar [char] " = ;
: readnum ( -- num-atom )
nextchar [char] " = ;
: readnum ( -- num-atom )
- minus? dup if
+ plus? minus? or if
+ minus?
inc-parse-idx
inc-parse-idx
+ else
+ false
then
0
then
0