[plt-scheme] scribble #<void>
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 "".