Re: [CODE] Question about Mag_Affects

From: The Fungi (
Date: 10/10/02

On Thu, Oct 10, 2002 at 07:23:51AM -0400, Justin Adler wrote:
> const char *to_vict = NULL, *to_room = NULL;

Don't read this too literally. In C it is used to declare a "string"
constant. Really, it is a pointer to a constant character, initially
pointed to the NULL address.

> to_vict = "You feel your strength wither!";

That sentence is a string constant. It is compiled directly into the
executable and loaded into memory when the MUD is started. The
command you reference is repointing *to_vict to the string constant
that contains the sentence. More specifically, it is setting the
address marker (pointer) named to_vict to be equal to the address
containing the first character of the chosen string constant.

I think.

But then again, I'm just a hack too...
{ IRL(Jeremy_Stanley); PGP(9E8DFF2E4F5995F8FEADDC5829ABF7441FB84657);
SMTP(; IRC(; ICQ(114362511);
AIM(dreadazathoth); YAHOO(crawlingchaoslabs); FINGER(;
MUD(; WWW(; }

   | FAQ: |
   | Archives: |
   | Newbie List:   |

This archive was generated by hypermail 2b30 : 06/25/03 PDT