[gambit-list] multiple definitions due to include/load

Thomas Hafner hafner at sdf-eu.org
Mon Feb 6 07:30:37 EST 2006


On Sun, Feb 05, 2006 at 11:09:14PM +0100, Thomas Hafner wrote:
> Is there a simple way for Gambit? Or doesn't it matter at all? (Why
> not?)

SLIB seems to provide that in a simple way (sorry for not having found
it earlier). Here follows an example.

Content of file ~/homecat:
    ;; -*-scheme-*-
    (
     (lib2 . "~/share/gambc/lib2")
    )

Content of file ~/share/gambc/lib2.scm:
    (define (lib2:hello)
      (display "Hello from lib2!")
      (newline))

gsi session:    
    > (require 'lib2)
    > (lib2:hello)
    Hello from lib2!
    > (require 'lib2)
    #t
    > (lib2:hello)
    Hello from lib2!
    >

(I don't say it's *better* than Christian's chjmodule, but for me it's
*simpler*, because SLIB is already available but chjmodule had to be
installed first.)

Regards
  Thomas
-- 
___ http://hafner.sdf-eu.org/ ___
___ mailto:thomas _______________
___________ @hafner.nl.eu.org ___



More information about the Gambit-list mailing list