public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
* Question about command-line-arguments and main method
@ 2013-02-04 18:15 Matthieu Vachon
  2013-02-04 20:59 ` Per Bothner
  0 siblings, 1 reply; 7+ messages in thread
From: Matthieu Vachon @ 2013-02-04 18:15 UTC (permalink / raw)
  To: kawa

Hi,

I hit a small problem with the variable `command-line-arguments`. The
compiler is always complaining that this variable is not declared.

Here the module I used (named `test.scm`):

(module-name <org.kawa.warning>)

(if (eq? command-line-arguments '#())
    (format (current-output-port) "No command arguments provided~%")
    (format (current-output-port) "Command arguments: ~a~%"
command-line-arguments))

And here the output produced by the compiler when doing `java
kawa.repl -d obj -C test.scm`:

(compiling src/scheme/test.scm to org.kawa.warning)
src/scheme/test.scm:3:10: warning - no declaration seen for
command-line-arguments
src/scheme/test.scm:5:61: warning - no declaration seen for
command-line-arguments

Is it a problem with how I use the variable? Is it a bug in the
compiler? This is a problem because we plan to treat error as warning
using `--warn-as-error` and this prevents compilation of those units.

I would also like to know if it's possible to produce a `.class` that
has a static main method in it so it's possible to call directly (.i.e
`java org.kawa.main` for example)?

Thanks in advance :)

Regards,
Matt

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-02-06  4:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-04 18:15 Question about command-line-arguments and main method Matthieu Vachon
2013-02-04 20:59 ` Per Bothner
2013-02-04 21:27   ` Matthieu Vachon
2013-02-04 21:40     ` Per Bothner
2013-02-04 22:04       ` Matthieu Vachon
2013-02-06  4:28         ` Matthieu Vachon
2013-02-06  4:35           ` Per Bothner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).