help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need help in understanding an example of recursion


From: Nikos Apostolakis
Subject: Re: Need help in understanding an example of recursion
Date: Sat, 02 Jun 2007 17:11:54 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.51 (gnu/linux)

Pascal Bourguignon <address@hidden> writes:

> Nikos Apostolakis <address@hidden> writes:
>> Is there some subtle[0] point about recursion that I am missing?
>> Any help in understanding this will be greatly appreciated.
>
> This is not a question of recursion.  It's a question of something you
> should have learned the first day of your first programming course,
> that you  should not use global variables and you should initialize
> your variables!
>
>
> Your variable named value is not a local variable of
> nea-next-partition.    Moreover, value is a variable that's bound to
> new values automatically, read it's documentation. C-h v value RET
>


This is embarasing.  I actually  red the documentation,  and I
thought that in the dolist construction the third argument is
automatically local.  Not sure where I got the impression since 
the example in the manual does initialize the variable!

Thanks for the answer and the tips,
Nikos






reply via email to

[Prev in Thread] Current Thread [Next in Thread]