Computer Chess Club Archives


Search

Terms

Messages

Subject: Can somebody write a debugging function for the following task or maybe

Author: Uri Blass

Date: 02:29:35 08/14/03


There is already a free program that does it?

The debugging function that I think about is writing the content of varaibles to
files

I should have 2 functions:

void Writearrays(int nodes)
{
//this function writes the arrays
int queens[9][2];
int rooks[10][2];
int bishops[10][2];
int knights[10][2];
int pawns[8][2];
to a file when the name of the file begins with movei and end with the number
nodes for example the file may have the name movei57.d when it gets nodes=57 and
the name movei898.d when it gets nodes=898
}

int comparearray(int nodes)
{
/*this function looks at the relevant file (for example movei898.d if nodes=898)
and compare the content of that file to the numbers that are in the array
This function return 0 if there is no problem and returns 1 if the file does not
match the varaible(in case of returning 1 the function also writes the name of
the array that is different and the exact places that it is different
*/
}

I will try to think about the problem by myself but my experience with files is
limited so it is not a trivial task for me and I need to look at previous work
that I did with files to refresh my memory(I imagine that there are good
programmers that can solve a problem like this in a few minutes)

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.