[plt-scheme] How to load a file.
Are you stuck using R5RS? If not, I'd switch to modules and use require.
E.g.
file1.scm:
#lang scheme
(define (square x) (* x x))
(provide square)
file2.scm:
#lang scheme
(require "file1.scm")
(define (cube x) (* x (square x)))
N.
On Tue, Mar 10, 2009 at 11:35 AM, Vinay Sachdev <vinay.sachdev at gmail.com> wrote:
> Hi,
> I want to use some functions of one file in another file.
> So I use load procedure as:
>
> #lang r5rs
> (load "sec-3.3.2.scm")
>
> But when I try to use function from that file error is coming as
> "unbound identifier in module"
>
> I am using version 4.1.3
> Am I doing it wrong? Please help.
> --
> Thanks and Regards
> Vinay Sachdev