Reputation: 167
I want to be able to print the variable of a structure when I instantiate it, in order to see what is going on. I have profusely googled this idea and cannot find anything concrete.
So for instance:
(setf object-name
(make-the-object :obj-var value
:obj-var1 value))
Could this become something like this:
(setf object-name
(make-the-object :obj-var value
:obj-var1 value
:(print obj-var1)))
so that the variable is printed on instantiation?
Upvotes: 0
Views: 481
Reputation: 21238
If you have a dedicated object-maker function, you can always just trace that function.
Upvotes: 1
Reputation: 9451
(setf object-name (print (make-the-object :obj-var value :obj-var value)))
Upvotes: 0