Re: Duping Bugfix

From: Edward Glamkowski (EGlamkowski@MATHEMATICA-MPR.COM)
Date: 01/16/98

>>I tried this.  It crashes mine on if(GET_NAME(dt->character) &&
>>!str_cmp(GET_NAME(dt->character), newname)).  But simply doing a check
>Maybe your compiler doesn't optimize the evaluation of if-conditions. Some
>don't stop at the first false of an AND.

Hmm... is it not standard to do so?
In the C books I've read, I'm sure they said that if the first
expression in an AND statement is false, the rest never gets

Which is why something like
  if (x == 0 && y++) { whatever }

may produce unexpected results if x != 0 and should be avoided.

Ah, but my memory isn't the greatest anymore, so I could just be
mis-remembering what I've read ;)

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

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