X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=blobdiff_plain;f=scheme.4th;h=19848b60409e957933ac482f72e87dc803f7a6b2;hb=af4ada618d8d096645f783f40508a1bd6ad0d95d;hp=644ee1914c221ab38227825a97f09599391140a6;hpb=22e181f918b5518f64ee693c492469d11f2898ac;p=scheme.forth.jl.git diff --git a/scheme.4th b/scheme.4th index 644ee19..19848b6 100644 --- a/scheme.4th +++ b/scheme.4th @@ -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