[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
Subject: printing structures and the #n= macro
We have problem with CL semantics and akcl when printing forms containing
structures.
We are printing out forms which include structures. Some of the structures
contain a pair of identical sub-structures. When printed out these appear
with the #n= syntax. For example:
...#s( navy ... #0=#s(ship ... ) ... #0# ...) ...
Our problem is if we have two such structures, both are printed with the #n='s
starting at 0 and the form cannot be read in.
My understanding is that the #n= is being used to ensure that the structure
when read back in will be 'equal' to the structure which was printed, and this
is necessary because 'equal' will not descend the structure, but use 'eq'
to test.
Meanwhile n is reset to 0 because there is no guarantee that print will print
a readable form.
Is this a correct understanding and can anyone suggest a work around?
Jon.