This is the mail archive of the kawa@sources.redhat.com 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]

What is the use of (require <xyz>) and explicit type declarations ?


Hoehle, Joerg-Cyril <Joerg-Cyril.Hoehle@t-systems.com> wrote:
> What is the use of a require "statement" w.r.t. file-compilation?

The require form makes symbols that exist in one module available in
another.  It doesn't really work for plain java classes.

A simple example with two files is below.

Regards,
Chris Dean

--- /dev/null	Tue Dec 10 02:57:38 2002
+++ Foo.scm	Thu Nov 13 10:43:09 2003
@@ -0,0 +1,5 @@
+(module-name <Foo>)
+(module-static #t)
+
+(define (foo-function)
+  'hello)
--- /dev/null	Tue Dec 10 02:57:38 2002
+++ Bar.scm	Thu Nov 13 10:43:12 2003
@@ -0,0 +1,7 @@
+(module-name <Bar>)
+(module-static #t)
+
+(require <Foo>)
+
+(define (bar)
+  (foo-function))


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