Re: SV: redefined constant value

Roger Corman <[email protected]> Tue, 28 Oct 2003 18:10:35 -0800
Newsgroups gmane.lisp.corman
Message-ID <[email protected]>
Thanks for answering this, Pavel. I hadn't seen your response before I repl=
ied.

Roger

At 09:33 AM 10/26/2003, you wrote:
>This is not an error. According to HyperSpec,
>
>  A constant defined by defconstant can be redefined with defconstant.
>  However, the consequences are undefined if an attempt is made to ...
>  assign it to a different value using a subsequent defconstant.
>
>Pavel Grozman
>
>> -----Ursprungligt meddelande-----
>> Fr=E5n: Denis Mashkevich [mailto:[email protected]]
>> Skickat: den 26 oktober 2003 17:28
>> Till: [email protected]
>> =C4mne: [cormanlisp] redefined constant value
>>
>>
>> Here's the problem:
>>
>> (defconstant +a+ 22)
>> > +A+
>>
>> (defun foo ()
>>     +a+)
>> > FOO
>>
>> (foo)
>> > 22
>>
>> ;redefining the constant:
>> (defconstant +a+ 33)
>> > ;;; Warning: Redefining constant +A+ with previous value 22 and new
>> value 33
>> > +A+
>>
>> (foo)
>> > 22
>>
>>
>> ;redefining the function
>> (defun foo ()
>>      +a+)
>> > FOO
>>
>> (foo)
>> > 33
>>
>>
>> BTW, CLISP doesn't exhibit this behaviour.
>>
>>                  Thanks, Denis.
>>
>>
>>
>> To unsubscribe from this group, send an email to:
>> [email protected]
>>
>>
>>
>> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms=
/
>>
>
>
>
>To unsubscribe from this group, send an email to:
>[email protected]
>
>=20
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/=
=20



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=3D5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/SyjtlB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[email protected]

=20

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/=20