[Ecls-list] struct problem
Larry Clapp
larry at theclapp.org
Tue May 18 10:58:12 UTC 2004
Michael O'Connor said:
> I'm hoping someone can explain why I'm getting extra
> whitespace in a struct I'm modifying. Here's a
> simplified example:
>
> (defstruct test
> long-variable-name-1
> long-variable-name-2
> )
> (setf test-data (make-test))
>
> (setf (test-long-variable-name-1 test-data) "a")
> (setf (test-long-variable-name-2 test-data) (cons
> 123.00 "d"))
> (format t "~A~%" test-data)
>
> This prints:
> #S(TEST LONG-VARIABLE-NAME-1 "a" LONG-VARIABLE-NAME-2
> (123.0
>
> . "d"))
>
> The problem seems to be related to the length of the
> struct member names and the data it includes (I
> think), and might be just an output formatting problem
> were it not for the fact that the more I modify the
> struct (by calling setf as in the example) the more
> whitespace it ends up containing, until soon the
> program stops (out of memory?).
Cannot reproduce. Can you elaborate, or give a longer example?
Can you clarify what you mean by "the structure contains whitespace"?
E.g, do the slot names grow? Do the slot values grow? Does the printed
representation change?
-- Larry
More information about the ecl-devel
mailing list