🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ti.explorer
Article #85

Shadowing Problem

#85
From: C. D. Covington
Date: Fri, 06 Oct 1989 14:21
29 lines
1232 bytes

   I have had a problem with shadowed variables being NIL in the called
function as exemplified by the following code.

(defvar some-var "Old Value")

(defun foo () 
  (let ((some-var "New Value"))
     (bar))
   )

(defun bar ()
  some-var)

  The variable some-var in the function bar ends up NIL if I simply load
the system using this code with (make-system ...) [I am using OS 4.0]
Recompiling bar explicitly with c-s-C somehow solves the problem.
Is order of compilation the problem?

C. David Covington
Assistant Professor, Electrical Engineering
University of Arkansas
Fayetteville, AR 72701

INTERNET cdc@uafhcx.uark.edu
(501)575-6583 campus office
     575-5379 research office
     575-3041 research lab
Technical Details
Message-ID: <3220@uafcveg.uucp>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!unmvax!deimos.cis.ksu.edu!uafcveg!uafhcx!cdc
References: <31952@srcsip.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!unmvax!deimos.cis.ksu.edu!uafcveg!uafhcx!cdc
From: cdc@uafhcx.uucp (C. D. Covington)
Newsgroups: comp.sys.ti.explorer
Subject: Shadowing Problem
Summary: Shadowed variables coming up NIL
Message-ID: <3220@uafcveg.uucp>
Date: 6 Oct 89 14:21:34 GMT
References: <31952@srcsip.UUCP>
Sender: netnews@uafcveg.uucp
Distribution: usa
Organization: College of Engineering, University of Arkansas, Fayetteville
Lines: 29