Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: a problem in trying to use unsigned varaibles

Author: Mikael Bäckman

Date: 08:47:37 09/24/03

Go up one level in this thread


On September 24, 2003 at 08:21:22, Jeremiah Penery wrote:

>On September 24, 2003 at 07:43:33, Uri Blass wrote:
>
>>I was told that unsigned varaibles are better to use in every case that I can do
>>it.
>>
>>one of the varaibles that cannot get negative value is the ply of the search but
>>the problem is that this varaible is connected with beta because I tell movei
>>always that beta cannot be more than 9999-ply
>>
>>How do you solve that problem?
>
>There is no real problem.
>
>>It was another varaible that I defined as unsigned and was connected with ply
>>and when I got the warning
>>signed/unsigned mismatch I tried to change ply to be unsigned and got more
>>warning of the same kind because beta is unsigned.
>>
>>I can get rid of the warning by adding signed.
>
>It's a meaningless warning in this case, so don't worry about it.


A warning is a warning.

Correcting bugs in hash or whatever, can be difficult even when the signeds and
unsigneds are correct.

I had a few unsigned ints here and some signed ones there and a couple of
#defines working on the ints. I had a hard time debugging my hash functions..

Just to be on the safe side, I think you should get rid of the warnings.


/Mikael




This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.