version 1.2, 1994/05/07 14:55:49
|
version 1.3, 1994/05/31 07:26:23
|
Line 36
|
Line 36
|
|
|
: f. ( r -- ) scratch represent 0= |
: f. ( r -- ) scratch represent 0= |
IF 2drop scratch 3 min type EXIT THEN |
IF 2drop scratch 3 min type EXIT THEN |
IF '- emit THEN dup >r 0< |
IF '- emit THEN dup >r 0<= |
IF '0 emit |
IF '0 emit |
ELSE scratch r@ min type r@ precision - zeros THEN |
ELSE scratch r@ min type r@ precision - zeros THEN |
'. emit r@ negate zeros |
'. emit r@ negate zeros |
scratch r> 0 max /string 0 max -zeros type space ; |
scratch r> 0 max /string 0 max -zeros type space ; |
|
\ I'm afraid this does not really implement ansi semantics wrt precision. |
|
\ Shouldn't precision indicate the number of places shown after the point? |
|
|
: fe. ( r -- ) scratch represent 0= |
: fe. ( r -- ) scratch represent 0= |
IF 2drop scratch 3 min type EXIT THEN |
IF 2drop scratch 3 min type EXIT THEN |