[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: undeclared variables
- To: sdobbs@trivia.coginst.uwf.edu
- Subject: Re: undeclared variables
- From: "Mark A. Tapia" <markt@dgp.toronto.edu>
- Date: Thu, 17 Sep 1992 17:54:09 -0400
- Cc: info-mcl@cambridge.apple.com
Steven Dobbs (sdobbs@trivia.coginst.uwf.edu) writes:
in the following piece of code,
why am I getting the undeclared free variable warnings?
(setq x t
y t
z nil)
? (and x (or z y))
;Compiler warnings :
; Undeclared free variable Z, in an anonymous lambda form.
; Undeclared free variable Y, in an anonymous lambda form.
This "problem" occurs in the or construction and not in the and:
? (or z y)
;Compiler warnings :
; Undeclared free variable Z, in an anonymous lambda form.
; Undeclared free variable Y, in an anonymous lambda form.
t
? (and z y)
nil
If you want to avoid the warning messages, declare z and y to be
variables
(defvar z t)
(defvar y t)
(defvar z t)
mark