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

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

Re: questioning let


From: Tim X
Subject: Re: questioning let
Date: Thu, 25 Feb 2010 08:36:39 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (gnu/linux)

Andreas Roehler <andreas.roehler@online.de> writes:

> Hi,
>
> behaviour of the example code below puzzles me. Would
> expect setting of arg by external function, but inside
> `let', recognised. But remains `1'.
>
> (defun arg-setting ()
>   (interactive)
>   (let ((arg 1))
>     (message "%s" arg)
>     (arg-extern arg)
>     (message "%s" arg)))
>
> (defun arg-extern (arg)
>   (setq arg (1- arg)))
>
> Any help?
>
> Thanks
>
>

I think if you put a (message ....) statement inside arg-extern and
pring it out, you will see what is happening. Maybe even change the name
of the parameter of arg-extern as this is probably leading to your
confusion and will clarify things.

Tim



>

-- 
tcross (at) rapttech dot com dot au


reply via email to

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