Let me consider the following simple session:
$ cat my-time1.cl
(in-package :cl-user)
(defpackage :my-time
(:use #:cl)
(:export #:*ut-offset*))
(in-package :my-time)
(defvar *ut-offset* 0)
$ cat my-time-test1.cl
(in-package :cl-user)
(defpackage :my-time-test
(:use #:cl #:excl #:my-time))
(in-package :my-time-test)
(eval-when (:execute :load-top-level)
(setq *ut-offset* 3600))
$ mlisp
cl-user(1): :cload my-time1
;;; Compiling file my-time1.cl
;;; Writing fasl file my-time1.fasl
;;; Fasl write complete
; Fast loading /tmp/my-time1.fasl
cl-user(2): :cload my-time-test1
;;; Compiling file my-time-test1.cl
;;; Writing fasl file my-time-test1.fasl
;;; Fasl write complete
; Fast loading /tmp/my-time-test1.fasl
cl-user(3): my-time:*ut-offset*
0
cl-user(4):
The question is simple. Why is the *ut-offset* 0? I'd think it should
be 3600, shouldn't it? Or did I make another blunder?
If I
:ld my-time-test1.cl
instead of
:cload my-time-test1
the *ut-offset* is 3600. Why it isn't when I load compiled file? It
seems that
(eval-when (:execute :load-top-level)
(setq *ut-offset* 3600))
doesn't work. However I'm at my wits' end to understand why.
Using ACL80
--
Vladimir Zolotykh
Vladimir Zolotykh <······@eurocom.od.ua> writes:
> [...] Why it isn't when I load compiled file? It
> seems that
>
> (eval-when (:execute :load-top-level)
> (setq *ut-offset* 3600))
>
> doesn't work. However I'm at my wits' end to understand why.
Because the right keyword is :LOAD-TOPLEVEL
--
__Pascal Bourguignon__ http://www.informatimago.com/
ATTENTION: Despite any other listing of product contents found
herein, the consumer is advised that, in actuality, this product
consists of 99.9999999999% empty space.
On Tue, 11 Apr 2006 15:14:29 +0200
Pascal Bourguignon <······@informatimago.com> wrote:
> Vladimir Zolotykh <······@eurocom.od.ua> writes:
>
> > [...] Why it isn't when I load compiled file? It
> > seems that
> >
> > (eval-when (:execute :load-top-level)
> > (setq *ut-offset* 3600))
> >
> > doesn't work. However I'm at my wits' end to understand why.
>
> Because the right keyword is :LOAD-TOPLEVEL
Of course. What a blunder I made!
Thanks
>
> --
> __Pascal Bourguignon__ http://www.informatimago.com/
>
> ATTENTION: Despite any other listing of product contents found
> herein, the consumer is advised that, in actuality, this product
> consists of 99.9999999999% empty space.
--
Vladimir Zolotykh