This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: "unbound location string->number"


You don't show what your Java code is, but I'm guessing you are missing
environment initialization:

http://www.gnu.org/software/kawa/Evaluating-Scheme-expressions-from-Java.html

void Scheme.registerEnvironment ()

    Initializes the Scheme environment. Maybe needed if you try to load
a module compiled from a Scheme source file.

Jim

Steve Smith wrote:

> Hi,
> 
> I have the following 'pure' Scheme module that I intend to call from
> my plugin adapter class ...
> 
>   (module-name 'au.com.isay.confluence.plugins.torrent.Bencode)
>   (module-static #t)
> 
>   ;; ...
> 
>   (define (bdec-int iport)
>      (let ((c (read-char iport))) ; Pop flag off the front
>         (string->number (snarf-until iport #\e))))
> 
>   ;; ...
> 
> This works fine in interpreted mode for unit tests, however when
> compiled and called from the class I get the following error:
> 
>   src/bencode.scm:28:7: unbound location string->number
> 
> Do I need to require some core namespace in this environment?
> 
> Cheers,
> Steve
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]