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

Re: printing of procedures



      When a procedure is printed, T outputs something like
    "#{Procedure 200 FORMAT}".  If I want procedures to print 
    differently (say, "#{FORMAT}" or "pFORMAT"), what do I
    have to change and how do I do it?
    
           
I assume you mean for a particular procedure rather than
for all procedures.  What you want to do is to define a
print method for that particular procedure:

 Instead of:
 
   (define (foo x) 
      (... what you want it to do))


 say
   
   (define foo (object
                (lambda (x) (... what you want it to do))
                ((print self stream) (how you want it to print))))



(If, on the other hand, you want all procedures to print in
 some particular way; look at files "print.t" and "operation.t"
 in the T source code. Good luck.)

/c
-------