new define-variable special form for Kawa

Per Bothner per@bothner.com
Thu Nov 6 05:18:00 GMT 2003


  - Syntax: define-variable name [init]
      If INIT is specified and NAME does not have a global variable
      binding, then INIT is evaluated, and NAME bound to the result.
      Otherwise, the value bound to NAME does not change.  (Note that
      INIT is not evaluated if NAME does have a global variable binding.)

      Also, declares to the compiler that NAME will be looked up in the
      dynamic environment. This can be useful for shutting up warnings
      from `--warn-undefined-variable'.

      This is similar to the Common Lisp `defvar' form.  However, the
      Kawa version is (currently) only allowed at module level.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/





More information about the Kawa mailing list