Re: [CODE] Introduction Snippet

From: Peter Ajamian (peter@pajamian.dhs.org)
Date: 11/13/00


Cruelworld Mud Admin wrote:
>
> The:
>
> int known;
>
> I suspect refers to the ID of the player you know??
> Well how about putting:
>
> char *name;
> there instead, strcmp can easily handle this and it would IMHO make the
> informative code more maintenance friendly.

It is far more efficient and easier to match a number than a string, not
to mention that the number takes up far less memory.  Also, using the
idnum avoids the problem of having to explicitly "forget" deleted
characters, oh and BTW, idnum is a long.

Regards, Peter


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/11/01 PDT