problem about scoping-Record and share programming errors


  • Rainer Joswig
    dynamic lisp common-lisp scoping lexical
    EDIT: I changed the example code after the first answer because I came up with a simple version that begs the same questions.I am currently learning Common Lisp’s scoping properties. After I thought I had a solid understanding I decided to code up some examples that I could predict the outcome of, bu

  • pixelearth

  • benipsen
    backbone.js coffeescript scoping ecma
    I’m writing an app using coffeescript with coffee toaster (an awesome NPM module for stitching) that builds my app.js file. Lots of my application classes and templates require info about the current user so I have an instance of class User (extends Backbone.Model) stored as a property of my main Application class (extends Backbone.Router). As part of the initialization routine I grab the user from the server (which takes care of authentication, roles, account switching etc.). Here’s th

  • user2085086
    scheme racket scoping drracket
    So I know that in Scheme define is for dynamic scoping and let for static scoping, yet the following thing confuses me:If I have(let ((x 0))(define f (lambda () x))(display (f))(let ((x 1))(displa

  • brian d foy
    perl foreach scoping
    I hope this is something straightforward that I’m doing wrong. I saw something online about “variable suicide” that looked good, but it was for an older version and I’m on 5.10.1.Anyway – a variable that I declared – $RootDirectory – just suddenly loses its value, and I can’t figure out why. Here’s a script to reproduce the problem. When I run through the script in debug mode (perl -d) I can get it to print out the $RootDirectory at line 21 and 26. But it’s gone by line 30.use strict; my $

  • krapdagn
    ruby class imap scoping
    RuNubie here. I’ve got a class Login that logs into gmail using the net/IMAP library. What is happening is that I create a new instance of that class, such as: a = Login.new(“username”, “gmail.com”, “passw”)Then, I’m working on other classes that will do some “stuff” with the mailbox. The problem is that the @imap

  • Abdul Munim
    javascript target var scoping
    I have a simple scoping issue that is eluding me.Here is a simpler version of the code but employs the same principle.function myFunction(){$(‘.selector_1, .selector_2’).cl

Originally posted 2013-08-31 07:01:21.