Slightly [OT] - The "code tag" is not working well
Posted: 21 Jan 2005, 11:57
Not really fitting to the forum, but probably only the programmers are intereded in the code tag. After my HD crash I lost few sources (I had very recent backup of Yace). This included the little sample code, that should show how to use TBs. I wanted to "download" it again from this forum, and it did not work anymore. For some reason, the forum software appended a space after any line, as a test case:
After the backslash, there must be no spaces. I already mentioned, that it won't display long lines correctly, either (linebreaks inside macros typically make the code wrong).
I saw a small error in the code, too:
pc = MYPIECE_TO_NALIMOV(pos->board[i][j]);
sq = ROWCOL_TO_64(i,j);
pc = pos->board[i][j];
The last line should be deleted. I started with that line, but the intention was to show, that a translation might be needed from internal piece values to Nalimov piece values. So I tried to show this, by introducing the macro MYPIECE_TO_NALIMOV (which dows nothing in this implementation). I forgot to delete the old line.
Regards,
Dieter
- Code: Select all
#define PI \
3.14
After the backslash, there must be no spaces. I already mentioned, that it won't display long lines correctly, either (linebreaks inside macros typically make the code wrong).
I saw a small error in the code, too:
pc = MYPIECE_TO_NALIMOV(pos->board[i][j]);
sq = ROWCOL_TO_64(i,j);
pc = pos->board[i][j];
The last line should be deleted. I started with that line, but the intention was to show, that a translation might be needed from internal piece values to Nalimov piece values. So I tried to show this, by introducing the macro MYPIECE_TO_NALIMOV (which dows nothing in this implementation). I forgot to delete the old line.
Regards,
Dieter