[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Questions about floating numbers, rethink and bug report
From: |
Dirk Herrmann |
Subject: |
Re: Questions about floating numbers, rethink and bug report |
Date: |
Thu, 18 Oct 2001 20:46:17 +0200 (MEST) |
On Wed, 10 Oct 2001, Keith Wright wrote:
> > From: Per Bothner <address@hidden>
> >
> > There is no such thing as a "writable literal", since a literal refers
> > to the program text. There are objects whose value is specified by a
> > literal, or (if you prefer) literals that are read as writable
> > objects. However, writing to an object that was read from a literal
> > is like replacing the literal "5.0". While some old Fortran compilers
> > would let you to that, no-one claimed that as a feature. It is just
> > made for hard-to-catch bugs.
>
> I think you are right, but Guile currently agrees with FORTRAN II
> on this point:
>
> guile> (define lotus '#(1 2 3))
> guile> (define x lotus)
> guile> (vector-set! x 1 666)
> guile> lotus
> #(1 666 3)
We should probably have a test in the test suite that is marked as
expected to fail - this will be a way to remember the issue. An entry in
BUGS or TODO might also make sense...
> Some implementations would give you a error message to prevent
> a seg-fault when you tried to change the program text. If this
> upsets you think of this:
>
> guile> (define (p)
> (let ((lotus '#(1 2 3)))
> (display lotus)(newline)
> (vector-set! lotus 1 666)))
> guile> (p)
> #(1 2 3)
> guile> (p)
> #(1 666 3)
Same as above...
Best regards
Dirk Herrmann
- Re: Uniform vectors: was Questions about floating numbers, (continued)
- Re: Questions about floating numbers, rethink and bug report, Neil Jerram, 2001/10/14
- Re: Questions about floating numbers, rethink and bug report, Dirk Herrmann, 2001/10/15
- Re: Questions about floating numbers, rethink and bug report, Neil Jerram, 2001/10/16
- Re: Questions about floating numbers, rethink and bug report, Dirk Herrmann, 2001/10/16
- Re: Questions about floating numbers, rethink and bug report, Neil Jerram, 2001/10/20
- Re: Questions about floating numbers, rethink and bug report, Chris Cramer, 2001/10/10
- Re: Questions about floating numbers, rethink and bug report, Per Bothner, 2001/10/10
- Re: Questions about floating numbers, rethink and bug report, Keith Wright, 2001/10/10
- Re: Questions about floating numbers, rethink and bug report,
Dirk Herrmann <=
- Re: Questions about floating numbers, rethink and bug report, Chris Cramer, 2001/10/11
- Re: Questions about floating numbers, rethink and bug report, Keith Wright, 2001/10/11
- Re: Questions about floating numbers, rethink and bug report, Chris Cramer, 2001/10/11