[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Working with constansts
From: |
Pascal J. Bourguignon |
Subject: |
Re: Working with constansts |
Date: |
Sun, 10 May 2009 18:33:38 +0200 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/22.3 (darwin) |
Richard Riley <rileyrgdev@googlemail.com> writes:
> pjb@informatimago.com (Pascal J. Bourguignon) writes:
>
>> Decebal <CLDWesterhof@gmail.com> writes:
>>
>>> I would like to work with constants in my elisp code. I thought that I
>>> could do this with defconst, but that doen not work.
>>> After:
>>> (defconst dummy "testing")
>>> The variable dummy has the value "testing".
>>> But after:
>>> (setq dummy "changed")
>>> The variable dummy has the value "changed".
>>> What am I doing wrong.
>>
>> You're still thinking that constants don't change or that variables do.
>>
>> If you don't want to change the value of a constant, then don't change
>> it.
>
> Why is it called a constant if its not enforced?
For example we call PI a constant. But PI is the ration between a
circle circumference and its diameter, and this ratio depends on the
curvature of the universe, so PI is not really a constant: in our
universe it depends on the altitude, or the distance to the sun, (on
the gravity in general).
So if you want to avoid bugs in your emacs program when you travel,
you must be able to nudge the values of the constants.
--
__Pascal Bourguignon__
- Working with constansts, Decebal, 2009/05/10
- RE: Working with constansts, Drew Adams, 2009/05/10
- Re: Working with constansts, Pascal J. Bourguignon, 2009/05/10
- Message not available
- Re: Working with constansts, Pascal J. Bourguignon, 2009/05/10
- Re: Working with constansts, Richard Riley, 2009/05/10
- Re: Working with constansts, Pascal J. Bourguignon, 2009/05/11
- Re: Working with constansts, Nikolaj Schumacher, 2009/05/12
- Message not available
- Re: Working with constansts, Pascal J. Bourguignon, 2009/05/12
- Re: Working with constansts, Nikolaj Schumacher, 2009/05/18