[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Printing of 'extend' objects

The following is a real bug, in the print methods of various EXTEND type
objects (strings, vectors, structs etc); I've fixed it (albeit in a
somewhat kludgy way) in all the software on the ITS systems, but
you may not get the advantage of this "fix" until the next Twenex
MacLISP distribution takes place (probalby in first week of January).
[but if you're real hard up, bug me again, and I'll see what can be
FTP'd to SCORE before then]
    Date: 13 Dec 1980 2133-PST
    Subject: maclisp problem
    I am having a problem with the PRINC command using the string package.
    When I do the following command. The output to the terminal does not occur
    for a string argument to PRINC.
    (SETQ outfile (list (open '(junk junk) '(out ascii))))
    (setq ^R t)
    (princ "string")
    The write to the file occurs properly.  However the terminal just returns T
    (the value of the function call).  For both symbols and numbers, it seems 
    to work properly.
The loss is due to the fact that MacLISP's built-in print routines make
a distinction between  (PRINx <item>)  and (PRINx <item> <files>).
The ^R switch is supposed to affect only the former format; but the way
PRINT messages are generated, and the way these print methods were written,
(and there doesn't seem much hope of changing these things now, except for 
my "kludgy" fix), they always use the latter format.  My "kludgy" fix is
a function now in EXTEND file
	    (AND ^R (NULL ^W))
       (CONS 'T STREAM)
which is called by the various print methods.