[plt-scheme] DrScheme: Reference to undefined identifier: require

From: Zane Shelby (zaneshelby at gmail.com)
Date: Mon Aug 3 20:58:45 EDT 2009

Hey Daniel!

The problem is 'require' isn't part of the R5RS language, so when you
try to use it in that language you're going to get an error. You could
use load, but that has slightly different behavior.

Is there particular reason why you'd like to use r5rs? If not, I'd
recommend you use PLT Scheme by selecting 'module' from the pulldown
and putting '#lang scheme' at the top of your file.

Hope that helps,
Zane

On Mon, Aug 3, 2009 at 12:09 PM, Daniel<phelps.da at gmail.com> wrote:
> Hello Everybody:
>    I am new to Scheme, so please be patient with me.  I have 2 files:
> ch2.scm and schemeTests.scm.  I would like to include schemeTests.scm
> in the ch2.scm file.
>
> According to the documentation, the include procedure "inlines the
> syntax in the file designated by path-spec in place of the include
> expression."  http://docs.plt-scheme.org/reference/include.html  This
> behavior is what I need.  However, I am having some trouble.
> Hopefully, this short interactive session can tell you something.
>
> Welcome to DrScheme, version 4.2.1 [3m].
> Language: R5RS; memory limit: 128 megabytes.
>> (require scheme/include)
> . . reference to undefined identifier: require
>> (include "schemeTests.scm")
> . . reference to undefined identifier: include
>> #lang scheme
> . . reference to undefined identifier: module
>
> If I place a call to (require scheme/include) in my source file, I
> receive the same error.  However, if I change the language from R5RS
> to advanced student custom, I get no complaints about 'require', but
> it breaks some of my previously existing code.  What am I doing
> wrong?  Your help and consideration is appreciated.
>
> Sincerely,
> Daniel
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>


Posted on the users mailing list.