[plt-scheme] mztext replacement

From: Eli Barzilay (eli at barzilay.org)
Date: Thu Feb 28 12:02:31 EST 2008

On Feb 28, Richard Cobbe wrote:
> On Thu, Feb 28, 2008 at 09:26:23AM -0500, Eli Barzilay wrote:
> >
> > [BTW, one thing that is missing for now some way to include another
> > file.  `require' doesn't work right since it executes the other file
> > before the current code runs.  Something like `include/reader' should
> > work, but I hope to get away with something more dynamic.
> > `dynamic-require' works fine, but I want it to use relative paths from
> > the source expression.]
> 
> Now I'm a bit worried again.  Usually when I use this kind of technology,
> I've got a large Scheme module, often including a parser-tools parser, that
> contains the code that I want to run.  Do I have to put all of that
> code into the file to be processed?

No.  Usual `require's work the same.  The problem is when you want
some text file to include some other text file.  The scribble/text
language always prints things, which means that

  foo
  @(require "blah")
  bar

will get you the output from "blah" too, but requires happen before
the current module is invoked, so that output will come before "foo"
is printed.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!


Posted on the users mailing list.