[plt-scheme] scribble #<void>

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed May 27 23:04:49 EDT 2009

At Wed, 27 May 2009 16:40:56 -0600, Jon Rafkind wrote:
> If I put some scheme code in a .scrbl file I end up with #<void>'s 
> printed in the result (I was hacking 
> scribblings/reference/file-ports.scrbl). How can I avoid printing #<void> ?
> 
> I have something like
> @(begin
>       ..stuff..)
> 
> (define ...) doesn't seem to print anything so I could just wrap all 
> expressions with a (define xxx ...).

`scribble/doc' or `scribble/manual' recognizes definitions and
`require' forms. So the lack of a `#<void>' in those cases is not
because a void result is recognized (which is what happens at the top
level), but because definitions and `require's are treated specially.

All expression results are incorporated into a document, so either make
it look like a definition (as you suggest) or have the expression
produce "".



Posted on the users mailing list.