chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] I'm confused (again)


From: William Ramsay
Subject: [Chicken-users] I'm confused (again)
Date: Thu, 26 Feb 2009 16:12:28 -0500
User-agent: Thunderbird 2.0.0.17 (X11/20080914)

Hi again,

This may seem like a strange question, but I'm confused about the use of set!. It may be a holdover from my pre-scheme days, but it seems I should be declaring a variable before using it with set!. In other words, I would use:

      (let
         ((x  0))

before setting x based on some value not available when x is declared.

But it appears that set! itself declares the variable and the let is not needed. Is this correct or is my code just working magically? And if set! does declare a variable what is it's scope? I've been writing scheme for a couple of years and just decided I have no idea what I'm doing. (but, then again, that's what makes programming such fun)

Bill





reply via email to

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