Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: printing different values for 2 identical numbers

Author: Tim Foden

Date: 06:16:04 09/10/03

Go up one level in this thread


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.



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.