From 056abdea90fc2a6c08f1f2140ce95d40a8561689 Mon Sep 17 00:00:00 2001 From: Brad Nelson Date: Mon, 27 Dec 2021 00:27:05 -0800 Subject: [PATCH] Adding f.s and fix typo. --- ueforth/common/floats.fs | 2 ++ ueforth/site/common.html | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ueforth/common/floats.fs b/ueforth/common/floats.fs index c61bf60..d9410a7 100644 --- a/ueforth/common/floats.fs +++ b/ueforth/common/floats.fs @@ -46,5 +46,7 @@ forth definitions internals : #fs ( r -- ) fdup f0< if fnegate #f+s [char] - hold else #f+s then ; : f. ( r -- ) <# #fs #> type space ; +: f.s ." <" fdepth n. ." > " + fdepth 0 max for aft fp@ r@ sfloats - sf@ f. then next ; forth definitions diff --git a/ueforth/site/common.html b/ueforth/site/common.html index 080551f..d74bdc3 100644 --- a/ueforth/site/common.html +++ b/ueforth/site/common.html @@ -179,11 +179,13 @@ AFLITERAL ( r -- ) FLITERAL ( r -- ) IMMEDIATE FCONSTANT ( r "name" ) -FVARAIABLE ( "name" ) +FVARIABLE ( "name" ) PI ( -- r ) FSQRT ( r r -- r ) + +F.S ( -- ) Print float stack.
Locals