Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: printing different values for 2 identical numbers

Author: Uri Blass

Date: 06:36:20 09/10/03

Go up one level in this thread


On September 10, 2003 at 09:16:04, Tim Foden wrote:

>On September 10, 2003 at 08:45:22, Uri Blass wrote:
>
>>I found that my program printed the numbers 0 and 1 when it did the following
>>code without printing mistake or mistake1.
>>
>>zobpawnkey[hply]=zobpawn;
>>if (nodes==663719)
>>{
>>	if (zobpawnkey[hply]!=zobpawn)
>>		printf("mistake");
>>	if ((zobpawnkey[hply]&1)!=(zobpawn&1))
>>		printf("mistake1");
>>	printf(" %d %d              ",(zobpawn&1),(zobpawnkey[hply]&1));
>                 ^^ ^^ these expect int, not __int64.
>
>If using Microsoft's compiler system, you should use %I64d instead.
>
>Cheers, Tim.

I understand that %d does not give me the right value but the fact that it
prints different numbers for identical numbers still seems strange to me.

Uri



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.