[plt-scheme] newbie question: printing structs?

From: Andrew Reilly (andrew-scheme at areilly.bpc-users.org)
Date: Tue Mar 13 01:53:11 EDT 2007

Hi there,

I'm into about my third week of programming in scheme, in
something later than my twentieth year of coding :-) A
late starter, you might say.  Having great fun, though!
(ssax.ss and sxml-match.ss from PLaneT, in particular, rock massively.
Thanks Oleg/Dimitry and Jim!)

I'm very pleased with the DrScheme environment and Help Desk so
far, but one of the things that I haven't figured out by myself,
yet, is bothering me enough that I thought I'd try the short-cut
of asking the experts:

When debugging, how can I print the entire contents of a struct?

I'm used to being able to just "print *a_foo" in gdb, and
have it dump the whole C struct, annotated with field names, to
the console.  All I can get in DrScheme(Textual MzScheme) is
#<struct:foo>.  I've tried to read section 4.5 Structure Inspectors in the
MzScheme lanugage manual, but regret that I don't get it yet.  I've tried
adding #f to the end of my list of fields, but that doesn't seem to make any



Posted on the users mailing list.