From: Barry Margolin
Subject: Re: Overload structure accessor function?
Date: 
Message-ID: <c8Vj1.27$J3.910312@cam-news-reader1.bbnplanet.com>
In article <············@nnrp1.dejanews.com>,
 <·······@ee.iitm.ernet.in> wrote:
>Hi,	I have a simple question: I have defined a structure tile with a
>field bot.  In some places, the argument to the function (tile-bot) can be
>NIL (implies a boundary tile). Is is possible to overload the function
>tile-bot, so that if it gets the argument NIL, it returns a value (say,
>most-negative-fixnum).

No, the accessor functions defined by DEFSTRUCT are not generic functions,
so you can't overload them.

You could use DEFCLASS (i.e. CLOS) rather than DEFSTRUCT.  The accessor
functions it defines are generic, so you can then define an accessor
specialized to the class NULL.

-- 
Barry Margolin, ······@bbnplanet.com
GTE Internetworking, Powered by BBN, Cambridge, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.