Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: A question about crafty chess.h

Author: Dieter Buerssner

Date: 12:53:45 01/08/03

Go up one level in this thread


On January 08, 2003 at 14:55:56, Robert Hyatt wrote:

>On January 08, 2003 at 08:25:06, Uri Blass wrote:
>
>>2)chess.h in crafty has the following code
>>
>>#if defined(HAS_64BITS)
>>  typedef unsigned long BITBOARD;
>>#else
>>#  if defined(NT_i386) || defined(NT_AXP)
>>    typedef unsigned __int64 BITBOARD;
>>#  else
>>    typedef unsigned long long BITBOARD;
>>#  endif
>>#endif
>>
>>Do I need all this #if's and in which machines my code is not supposed to work
>>if I avoid them and simply defined bitboard as unsigned__int64
>>Noe the problem is to understand chess.h that is a basic file.
>
>__int64 is _only_ going to work on microsoft's compiler.

It also works with Borland. Perhaps more.

>It will not work
>on gcc or any other compiler I know of.  If you have no need to compile with
>other compilers (gcc, etc) then you can do without the spaghetti code above.

I am also puzzled by the above code snippet. Actually I cannot see, what the
difference would be to slighly simpler looking:

#if defined(NT_i386) || defined(NT_AXP)
  typedef unsigned __int64 BITBOARD;
#else
  typedef unsigned long long BITBOARD;
#endif

Regards,
Dieter





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.