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

Re: reading external representation



Quoting Hassoun Karam:
> i am trying to read external representations of objects (from a disk 
> file) and i get this error:
> read: bad syntax `#<' at position 8 in ... (name of the disk file). i 
> have read the help section on 'read' and external representation but i 
> am still missing something.
> 
> the expression i am trying to read is : (send #<object:geom%> translate! 
> #3(-40 0 1))

Some (perhaps most) values do not have external reprsentations that can
be parsed by `read'. Anything that prints #<...> is such a value, and
all class instances fall into that category.

You'll have to manually marshal and unmarshal the objects.
(General-purpose automatic object marhsaling would be difficult or
impossible to add to MzScheme, due to first-class classes.)

Matthew