Do not print a flonum array as a number.
authorChris Hanson <org/chris-hanson/cph>
Tue, 10 Dec 1991 23:30:58 +0000 (23:30 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 10 Dec 1991 23:30:58 +0000 (23:30 +0000)
v7/src/runtime/unpars.scm

index 3a8a59f6768faf8de25563175a9c6411935053f7..6acc58f4f98e779fc9411d9bec7c3e7a31093476 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/unpars.scm,v 14.24 1991/09/18 20:00:45 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/unpars.scm,v 14.25 1991/12/10 23:30:58 cph Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -66,7 +66,8 @@ MIT in each case. |#
 
 (define (set-current-unparser-table! table)
   (guarantee-unparser-table table)
-  (set! *current-unparser-table* table))
+  (set! *current-unparser-table* table)
+  unspecific)
 
 (define (make-system-global-unparser-table)
   (let ((table (make-unparser-table unparse/default)))
@@ -80,7 +81,7 @@ MIT in each case. |#
                (ENVIRONMENT ,unparse/environment)
                (EXTENDED-PROCEDURE ,unparse/compound-procedure)
                (FIXNUM ,unparse/number)
-               (FLONUM ,unparse/number)
+               (FLONUM ,unparse/flonum)
                (FUTURE ,unparse/future)
                (INTERNED-SYMBOL ,unparse/interned-symbol)
                (LIST ,unparse/pair)
@@ -563,6 +564,11 @@ MIT in each case. |#
        ((16) (prefix "#x" 10 16))
        (else 10))))))
 
+(define (unparse/flonum flonum)
+  (if (= (system-vector-length flonum) (system-vector-length 0.0))
+      (unparse/number flonum)
+      (unparse/default flonum)))
+
 (define (unparse/future future)
   (*unparse-with-brackets 'FUTURE false
     (lambda ()