From: 伊藤一光 <kaz.mitu.ito@gmail.com>
To: kawa@sourceware.org
Subject: The command line option --script
Date: Thu, 4 Jan 2024 12:16:34 +0900 [thread overview]
Message-ID: <CALJPn-w88pdiGjDseHsUvj+=9wk2eTkOL=8WvOPvf5U2T6ftYg@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 918 bytes --]
I remember reading some explanation about the command line option
"--script", but I do not fully understand it. Now I have got a script which
shows significantly different results depending on whether it is run with
or without "--script". I would like to know how this happens.
Here is my test case.
$ java kawa.repl -e '(scheme-implementation-version)'
3.1.1 (git describe: 3.1.1-0-gc47de33ad)$
$ cat 0.scm
(include "01.scm")
(include "02.scm")
(display (format #f "~a ~a ~a ~%" a1 a2 aa))
$ cat 01.scm
;; This is 01.scm
(define aa '())
(define-syntax define-a
(syntax-rules ()
((_ a p)
(begin
(define a p)
(set! aa (cons a aa))))))
$ cat 02.scm
;; This is 02.scm
(define-a a1 1)
(define-a a2 2)
$ java kawa.repl 0.scm
1 2 (2 1)
$ java kawa.repl --script 0.scm
/home/kaz/02.scm:3:1: duplicate declaration of 'aa'
/home/kaz/02.scm:3:1: (this is the previous declaration of 'aa')
$
next reply other threads:[~2024-01-04 3:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-04 3:16 伊藤一光 [this message]
2024-01-04 5:46 ` Per Bothner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CALJPn-w88pdiGjDseHsUvj+=9wk2eTkOL=8WvOPvf5U2T6ftYg@mail.gmail.com' \
--to=kaz.mitu.ito@gmail.com \
--cc=kawa@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).