Path: utzoo!attcan!uunet!ncrlnk!ncrcae!hubcap!gatech!cwjcc!tut.cis.ohio-state.edu!unmvax!ncar!noao!asuvax!nud!sunburn!dover!hume From: hume@dover.uucp (Chris Hume) Newsgroups: comp.lang.lisp Subject: Basic Lexical Variable Question Keywords: Lexical Variables, Binding Message-ID: <611@dover.uucp> Date: 20 Dec 88 22:59:13 GMT Organization: Motorola Sector CAD, Mesa, AZ {dover} Lines: 42 An incredibly naive question - the answer to which, I suspect, may be that the question would not arise given adequate understanding of the role of Lexical Variables: In the form below, is there any way to achieve the binding for "value" without giving it an initial value? (do ((computed nil) (value nil)) (computed (print value)) (setq value 1) (setq computed t)) I know that Lexical Variables are not considered to be "bound" in the same sense that Special Variables are. It may further be a distinct ADVANTAGE that they will always "represent" some value, but is the notion of an UNINITIALIZED Lexical Variable somehow a contradiction in terms? Coming at the question from another direction: the value below is, of course, 1 (and not 2.) (let ((variable 0)) (set 'variable 1) (setq variable (1+ variable))) In this case "(set (quote variable) foo)" and "(setq variable foo)" are NOT equivalent! Is it even POSSIBLE for Common Lisp to provide the functionality of "set" to Lexical Variables? Thanks in advance, for any clarification. Chris -- Christopher N. Hume Net: ...!sun!sunburn!dover!hume MOTOROLA, Inc. M/D: DOV05 2222 South Dobson Road Tel: (602) 994-6835 Mesa, AZ 85202 FAX: (602) 994-6895