[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] Re: [Gcl-devel] Segmentationviolation:cstackok:sig
From: |
root |
Subject: |
Re: [Axiom-developer] Re: [Gcl-devel] Segmentationviolation:cstackok:signalling error with GCL-2.7.0 (cvs head) |
Date: |
Fri, 1 Dec 2006 14:26:39 -0500 |
> > > >
> > > > (and (a > -1.0) (a < 1.0))
> > > >
> > > > This is not Lisp code :-)
> > > >
> > >
> > > Oh! Duh, <embarrassment> ...
> > >
> > > So this doesn't cause an error when compiling Axiom with GCL?
> >
> > No this does not cause an error. I'm wrong when I say that this
> > is not Lisp code, but since I know the intentions of the author,
> > I inferred that he used another language.
> >
> > > Does #+(or :cmu :akcl cause it to be excluded?
> >
> > No, akcl and gcl are actually, apparently, synonyms.
> >
>
> Ok, but now I *am* even more confused. As far as I can see
>
> (and (a > -1.0) (a < 1.0))
>
> is syntactically incorrect in any Lisp implementation. (Which is
> what I thought you meant when you said it was not lisp code.) Why
> do you now say that you were "wrong"? If this code is not excluded
> somehow, why doesn't this cause an error when compiling Axiom?
The > and < are just symbols so this is equivalent to calling two
functions, a and b with the value of the symbol > and an integer.
do the following:
(setq < 3)
(setq > 4)
(defun a (x y) (list x y))
(defun foo () (if (and (a > -1.0) (a < 1.0)) 0 1))
(foo)
when foo is called the function a is first called with the
value of > and -1.0 resulting in the list '(4 -1.0). then
a is called with the value of < and 1.0 resulting in the
list '(3 1.0). Then we compute (and '(4 -1.0) '(3 1.0))
which is equivalent of (and t t) so the if statement
returns a zero. Since this is the last expression the
result of the function foo is 0
t