chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Re: tcp-read-timeout: procedure or parameter?


From: William Xu
Subject: [Chicken-users] Re: tcp-read-timeout: procedure or parameter?
Date: Wed, 25 Jun 2008 23:31:06 +0900
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2.50 (darwin)

Alex Sandro Queiroz e Silva <address@hidden> writes:

>      <body> may call procedures that have a tcp-read-timeout free
> variable, but due to lexical scope that variable will most certainly not
> be bound to the one you want. For this you need dynamic scope.

Do you mean something like the procedure `foo' call here? 

    (define radix (make-parameter 10))
    
    (define (foo)
      (radix))
    
    (parameterize
     ((radix 8))
     (foo))

But the (foo) call is still bounded by (radix 8), hence the result is
still 8 ? 

-- 
William

http://williamxu.net9.org

Did you know that for the price of a 280-Z you can buy two Z-80's?
                -- P.J. Plauger





reply via email to

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