[comp.windows.news] saveing procedures from NeWS

trevor@GRASP.CIS.UPENN.EDU (Trevor Darrell) (10/16/87)

Has anyone managed to create a procedure that can write an arbitrary 
procedure to a file? Or even a simple (ie- without complex objects)
procedure? I can't seem to get rid of the single quotes NeWS puts
around all operators, which prevent NeWS from reading in the output
it produces. I'm sure I could convert all operators to strings and
manually chop off any quotes, but that seems like an ugly hack. Am
I missing something?

faulkner:~% psh
executive
Welcome to NeWS Version 1.0
/foo { 1 1 add } def
/foo load ==
{1 1 'add'}
/foo load 2 get ( %\n) exch 1 array astore printf
 'add'
/dumpfile (foo) (w) file def
dumpfile /foo load 2 get ( 2 2 %\n) exch 1 array astore fprintf
dumpfile closefile
(foo) run
**ERROR** The error & current stack are:
        /newerror:      true
        /errorname:     /undefined
        /command:       'add'
2 2 
faulkner:~% cat foo
 2 2 'add'
faulkner:~% 




--trevor
trevor@grasp.cis.upenn.edu