[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Strange results
From: |
Neuwirth Erich |
Subject: |
Re: Strange results |
Date: |
Sat, 7 Sep 2013 15:54:26 +0200 |
One more remark.
Writing number base conversions without recursive functions feels utterly
strange for me.
On Sep 7, 2013, at 2:34 PM, "Pascal J. Bourguignon" <pjb@informatimago.com>
wrote:
> Dwaddle <rmborchers@gmail.com> writes:
>
>> let didn't do the job, same results. But the problem is solved by explicit
>> setting the value to 0 or 1
>
> Indeed, it's not only a problem of scope (with setq you modified global
> dynamic variables, which is dangerous because it _may_ interfer with
> other functions using the same variables.
>
> But your problem was because you modified a literal object originally
> built by the [0 0 0 0 0 0 0 0] expression. But it is always the same
> object that is modified every time you call the function. Hence the use
> of vector or make-vector, which create new vectors each time they're
> evaluated.
>
> --
> __Pascal Bourguignon__
> http://www.informatimago.com/
smime.p7s
Description: S/MIME cryptographic signature