Re: your mail

From: Brian Pape (bpape@ezl.com)
Date: 04/07/96


>     for (door = 0; door < NUM_OF_DIRS; door++)
>       if (EXIT(ch, door) && EXIT(ch, door)->to_room != NOWHERE &&
> 	  !IS_SET(EXIT(ch, door)->exit_info, EX_CLOSED)){
>       sprintf(buf, "%s%c ", buf, LOWER(*dirs[door]));
>       }
>     sprintf(buf2, "%s[ Exits: %s]%s\r\n", CCCYN(ch, C_NRM),
> +->	  *buf ? buf : "None! ", CCNRM(ch, C_NRM));
> |   send_to_char(buf2, ch);

>     Would someone please explain to me what this line does?  It is from
>     act.informative.c, in the autoexit code, around line 300

If no exits are found in the room, the variable 'buf' will be '\0', so it
prints "None" instead of printing the variable itself.



This archive was generated by hypermail 2b30 : 12/18/00 PST