On Tue, 6 Oct 1998, Scott Clifford wrote:
> Any help is greatly appreciated :)
The code snippet you sent works, try the test harness that I attached to
this message. The problem must be somewhere else, such as the value of
number. Perhaps you put a log message in the else condition to tell if
the value of number is not 0, 1, or 2
--
The Phoenix - President of The Artistic Intuition Company
Caelius * Zen-X * Mirror Reflex * Runica * X-Domain * Infinite Realms
http://www.io.com/~fenix
--8<--
#define EX_ISDOOR 1
#define EX_PICKPROOF 2
int main(void)
{
printf("0 returns: %d\n", door(0));
printf("1 returns: %d\n", door(1));
printf("2 returns: %d\n", door(2));
printf("3 returns: %d\n", door(3));
return 0;
}
int door(int number)
{
return (number == 0 ? 0 :
(number == 1 ? EX_ISDOOR :
(number == 2 ? EX_ISDOOR | EX_PICKPROOF :
0)));
}
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST