Hallo,

William Xu wrote:
Alex Sandro Queiroz e Silva <[EMAIL PROTECTED]> 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 ?

In this case foo sees the right radix variable, which is bound to a parameter, due to lexical scoping. But inside the parameterize block, that very same parameter will return a different value, acting like a dynamically bound variable.

-alex
http://www.ventonegro.org/


_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to