diff options
author | dos-reis <gdr@axiomatics.org> | 2008-10-02 00:13:14 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-10-02 00:13:14 +0000 |
commit | e0768c0d00e70b1418209b56c9ec949e67907578 (patch) | |
tree | a3ebde86f702a6daa3bf39874d548452f3cf22f1 /src/algebra/outform.spad.pamphlet | |
parent | 5a75abac25fefe3ab47e84df35e76b898e653656 (diff) | |
download | open-axiom-e0768c0d00e70b1418209b56c9ec949e67907578.tar.gz |
* algebra/outform.spad.pamphlet (doubleFloatFormat$OutputForm): Move
from DoubleFloat.
Diffstat (limited to 'src/algebra/outform.spad.pamphlet')
-rw-r--r-- | src/algebra/outform.spad.pamphlet | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/algebra/outform.spad.pamphlet b/src/algebra/outform.spad.pamphlet index 1c340f3e..47486571 100644 --- a/src/algebra/outform.spad.pamphlet +++ b/src/algebra/outform.spad.pamphlet @@ -244,6 +244,9 @@ OutputForm(): SetCategory with ++ outputForm(sf) creates an form for small float sf. empty : () -> % ++ empty() creates an empty form. + doubleFloatFormat : String -> String + ++ change the output format for doublefloats using lisp + ++ format strings --% Sizings width: % -> Integer @@ -486,6 +489,12 @@ OutputForm(): SetCategory with car ==> CAR$Lisp cdr ==> CDR$Lisp + format: String := "~G" + doubleFloatFormat(s:String): String == + ss: String := format + format := s + ss + a, b: % l: List % s: String @@ -507,7 +516,10 @@ OutputForm(): SetCategory with coerce(a):OutputForm == a pretend OutputForm outputForm n == n pretend % outputForm e == e pretend % - outputForm(f:DoubleFloat) == f pretend % + outputForm(f:DoubleFloat) == + -- ??? this really should be rendered in as a sequence of + -- ??? OutputForm bytecodes, not hardcoded here. + FORMAT(NIL$Lisp,format,f)$Lisp outputForm s == sform concat(quote()$Character, concat(s, quote()$Character)) |