Skip to content
  • (defconstant +foo+ 42)

    (defun foo () (format t "D%" +foo+))

    (eval-when (:compile-toplevel :load-toplevel :execute) (defconstant +bar-1+ 10) (defconstant +bar-2+ 20))

    (defun bar (x) (ecase x (#.+bar-1+ 1) (#.+bar-2+ 2)))

    #|

    cl-user> (compile-file "/tmp/a.lisp") #P"/private/tmp/a.dx64fsl" nil nil cl-user>

    |#

0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment