Re: [OFF-TOPIC] question about switch, return, break

From: StormeRider (silk@ICI.NET)
Date: 12/19/97


At 10:07 AM 12/19/97 -0500, you wrote:
>>> break is not needed in a switch statement.
>>
>>That is absolutely, unequivacally *NOT* true for ANSI C compatible
>>compilers.  'break' is required.  If you want to test it, just
>>type in a switch() statement that has no 'break's and see what the
>>compiler tells you.
>>
>I am sorry Daniel, but you are simply wrong.  Try it for yourself.
>Compile this with gcc:
>
>#include <stdio.h>
>
>main()
>{
>    int i = 10;
>
>    switch (i) {
>      case 1:
>      case 2:
>      case 3:
>      case 4:
>      default:
>        printf("Sean is right!");
>   }
>}
>
Ack, no \r\ns!! =) Interesting thread here tho on ANSI vs. gcc...

ObjCircle:

What would cause many many many attempts to damage a corpse and crashes on
what seems to be autoloot/gold code? Before you say the gdb output it pops
up very erratically and I dont have much time to spend killing monsters but
morts fighting mobs tends to crash it a lot.


StormeRider                  --- http://www.windsofstorm.net/wos/
silk@ici.net                 --- telnet://cmoo.com:4004


     +------------------------------------------------------------+
     | 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/08/00 PST