string->number works.
[scheme.forth.jl.git] / scheme.4th
index 644ee19..19848b6 100644 (file)
@@ -301,7 +301,7 @@ global-env setobj
             abort
 ;
 
-: ensure-arg-type ( arg type -- )
+: ensure-arg-type ( arg type -- arg )
     istype? false = if
         arg-type-error
     then
@@ -393,8 +393,11 @@ parse-idx-stack parse-idx-sp !
 : minus? ( -- bool )
     nextchar [char] - = ;
 
+: plus? ( -- bool )
+    nextchar [char] + = ;
+
 : fixnum? ( -- bool )
-    minus? if
+    minus? plus? or if
         inc-parse-idx
 
         delim? if
@@ -493,8 +496,11 @@ parse-idx-stack parse-idx-sp !
     nextchar [char] " = ;
 
 : readnum ( -- num-atom )
-    minus? dup if
+    plus? minus? or if
+        minus?
         inc-parse-idx
+    else
+        false
     then
 
     0