CODE i->f
pushPS(reinterpret(Int64, Float64(popPS())))
END-CODE
+
+: f.scientific ( float -- )
+;
+
+: f.plain ( float -- )
+
+;
+
+: f. ( float -- )
+ dup dup 1000000 i->f f>= swap 1 i->f 10000 i->f f/ f< or if
+ f.scientific
+ else
+ f.plain
+ then
+;
: string? ( -- bool )
nextchar [char] " = ;
-: readfixnum ( -- num-atom )
+: readfixnum ( -- fixnum )
plus? minus? or if
minus?
inc-parse-idx
fixnum-type
;
+: readflonum ( -- flonum )
+ \ DRAFT!!!
+ readfixnum drop i->f
+
+ [char] . netchar = if
+ 10 i->f
+ begin digit? while
+ nextchar [char] 0 - i->f over f/ f+
+ inc-parse-idx
+ repeat
+ then
+
+ [char] e nextchar = [char] E nextchar = or if
+ readfixnum drop i->f
+ f^
+ then
+
+ flonum-type
+;
+
: readbool ( -- bool-obj )
inc-parse-idx