[comp.sys.ti.explorer] TI lisp and "IF"

bonura@GOOFY ("Tom Bonura") (04/04/91)

Used to be, when I wrote a conditional using IF with a macro as the predicate,
everything worked just fine.  I just installed the latest version of TI lisp on my
MX (lisp version 6.1) and now I get a break with the message "Attempt to evaluate
[my macro] as a function".  ANyone know if this is the correct behavior for IF
and/or why this is now different?

|+++++++++++++++++++++++++++|
|Tom Bonura                 |
|Advanced Technology Group  |
|Apple Computer, Inc.       |
|20525 Mariani Ave. MS 76-3D|
|Cupertino, CA 95014        |
|                           |
|Phone: (408)974-4538       |
|e-mail: bonura@apple.com   |
|AppleLink: BONURA          |
|+++++++++++++++++++++++++++|

acuff@SUMEX-AIM.STANFORD.EDU (Richard Acuff) (04/08/91)

> Used to be, when I wrote a conditional using IF with a macro as the
> predicate, everything worked just fine.  I just installed the latest
> version of TI lisp on my MX (lisp version 6.1) and now I get a break with
> the message "Attempt to evaluate [my macro] as a function".  ANyone know if
> this is the correct behavior for IF and/or why this is now different?

I think I'm using the latest versions and I don't see this problem.  Do you
have demonstration code?

	-- Rich

Bjorn.Victor@docs.uu.se (Bjorn Victor) (04/09/91)

  >Sender: acuff@ksl-mac-62.stanford.edu
  >Date: Mon, 8 Apr 91  09:25:25 PDT
  >Reply-To: acuff@sumex-aim.stanford.edu
  >From: Richard Acuff <acuff@sumex-aim.stanford.edu>
  >
  >> Used to be, when I wrote a conditional using IF with a macro as the
  >> predicate, everything worked just fine.  I just installed the latest
  >> version of TI lisp on my MX (lisp version 6.1) and now I get a break with
  >> the message "Attempt to evaluate [my macro] as a function".  ANyone know if
  >> this is the correct behavior for IF and/or why this is now different?
  >
  >I think I'm using the latest versions and I don't see this problem.  Do you
  >have demonstration code?
  >
  >	-- Rich

My guess is that Tom Bonura is using the macro before its definition.
This is a classic thing, and Tom should move the macro definition to
a place before its use, or change his DEFSYSTEM so the file using the
macro depends (at both compile- and load-time) on the file defining it.

I still don't understand why compilers can't be two-pass, to handle
these things.

-- Bjorn Victor			Bjorn.Victor@DoCS.UU.SE
Dept. of Computer Systems	tel: +46 18183169; fax: +46 18550225
Uppsala University, Sweden	"I'd rather hack a Lisp Machine!"