Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: By the way, here is an instance where crafty's node counts truncate

Author: David Eppstein

Date: 15:29:37 09/26/99

Go up one level in this thread


On September 26, 1999 at 16:25:44, Robert Hyatt wrote:
>On September 26, 1999 at 14:07:03, Heiner Marxen wrote:
>>Say, you want at most 8 such conversions to be used
>>in one printf (between 2 sequence points).  Just use an 8-element array
>>of such static string buffers, with a static index for the next to use
>>element, cyclically walking through the 8 buffers.  I've done that,
>>and found it to be a great help.
>>
>>Sometimes I've used "double" for counters to achieve 53 bits of integer
>>precision, and print them with "%.0f".
>>
>>Heiner
>
>it would work, but it is a very sloppy programming approach.  IE imagine what
>happens when you use this  piece of code to display more than 8 values at one
>time when you are debugging one day. And you forget that you have that 8 number
>limit, and spend a lot of time debugging something that isn't a bug, because the
>output is corrupted...
>
>as the saying goes, "been there, done that, but _not_ doing it tomorrow..."

In two messages in the same thread you are saying you want to avoid sloppy
unsafe programming practices, and also saying you want to use sprintf???

(Hint: it has no protection against buffer overflows.)



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.