Re: [CODE] 'variable' is assigned a value that is never used...

From: George (greerga@DRAGON.HAM.MUOHIO.EDU)
Date: 09/02/97

On Mon, 1 Sep 1997, David Eliott wrote:

>- Conversion may lose signifigant digits.
>how to fix them, since these conversions were being done in C, and NEED
>to be done for the code to work. It says that the program might have bad
>results, but since we KNOW that these conversions were being done in C
>with no problem, should they need be changed in C++? just to make sure
>everything works ok? Maybe this could make CircleMUD a little more
>stable? dunno...

Are you using 'float' or 'double' and converting it?

>- Possibly incorect assignment.
>This is the one that shows up the most in the code, 50% probably. And I
>know how to fix this, but I can't do it everywhere... The Help Index
>tells me that I should do ((x = x) != 0) to all (x = x) because it makes
>sure that the end result is ok! But this is not doable for some code, or
>at least, I dont think so... If you think I should change this like
>that, in the help index, let me know...

if ((number = atoi(arg)) && number < 0)

will work just fine, the ()'s are good.

George Greer  -   | Genius may have its limitations, but stupidity | is not thus handicapped. -- Elbert Hubbard

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

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