Re: ANA() SANA() Macros are wrong...

From: Peter Ajamian (peter@pajamian.dhs.org)
Date: 03/10/01


George Greer wrote:
>
> #define ANA(obj) (strchr("aeiouyAEIOUY", *(obj)->name) ? "An" : "A")
> #define SANA(obj) (strchr("aeiouyAEIOUY", *(obj)->name) ? "an" : "a")
>
> struct obj_data {
> [...]
>    char *name;                    /* Title of object :get etc.        */
>    char *description;             /* When in room                     */
>    char *short_description;       /* when worn/carry/in cont.         */
>    char *action_description;      /* What to write when used          */
> [...]
> };
>
> SANA is only used by act(), hence it would most likely be trying to 'a' /
> 'an' the object's short description, not the alias list. Most objects have
> a short description of "an apple" anyway, instead of the code using $a/$A
> for that.

It doesn't compare against the short description it compares against the
name (title, alias, whatever).  If you feel the function is useless,
then fine, take it out.  If it's gonna be left in then it should at
least work, regardless of what it's used for.

Regards, Peter

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/04/01 PST