Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Crafty internal iterative deepening

Author: Robert Hyatt

Date: 08:53:21 01/26/00

Go up one level in this thread


On January 26, 2000 at 10:59:13, Ulrich Tuerke wrote:

>On January 26, 2000 at 08:08:01, Tijs van Dam wrote:
>
>
>>  tree->next_status[ply].phase=FIRST_PHASE;
>>  if (tree->hash_move[ply]==0 && do_null && depth>=3*INCPLY) do {
>>  ....
>>  } while(0);
>
>The  "do  { ... } while (0)"
>above looks peculiar to me. Another copy mistake ?
>
>Uli


No.  that is a usual C programming construct so that inside the loop
you can use a break;  It is much more readable that sticking in a goto exit;
even though the assembly code is identical.  A break must goto a forward point,
and _always_ at the end of the current loop.  When you see the break, you can
find where it is going easily, while a goto can jump across the moon and you
have to search for the target...

Bob



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.