Crafty 22.8
init.c line 33, minor oops
void Initialize()
{
int i, major, minor, id;
TREE *tree;
void *mem;
int j;
tree = block[0];
for (j = 1; j < MAX_BLOCKS; j++)
block[j] == NULL;
Guess this should be block[j] = NULL;
Crafty 22.8
Moderator: Ras
-
bob
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: Crafty 22.8
Absolutely. I'll fix it.frankp wrote:Crafty 22.8
init.c line 33, minor oops
void Initialize()
{
int i, major, minor, id;
TREE *tree;
void *mem;
int j;
tree = block[0];
for (j = 1; j < MAX_BLOCKS; j++)
block[j] == NULL;
Guess this should be block[j] = NULL;
-
Cardoso
- Posts: 363
- Joined: Thu Mar 16, 2006 7:39 pm
- Location: Portugal
- Full name: Alvaro Cardoso
Re: Crafty 22.8
I've done my share of those.
But it is unbelivable how we do these things.
Could it be that programming can cause things like alzhimer desease?
I'm saying this because I'm in a pretty bad shape.
I'm 42 and I just sleep 3-5 hours and medication don't help much.
I guess we live in a world we ain't suppose to live in, almost everything around us is bad.
best regards,
Alvaro
But it is unbelivable how we do these things.
Could it be that programming can cause things like alzhimer desease?
I'm saying this because I'm in a pretty bad shape.
I'm 42 and I just sleep 3-5 hours and medication don't help much.
I guess we live in a world we ain't suppose to live in, almost everything around us is bad.
best regards,
Alvaro
-
Tord Romstad
- Posts: 1808
- Joined: Wed Mar 08, 2006 9:19 pm
- Location: Oslo, Norway
Re: Crafty 22.8
What compiler(s) do you guys use? I thought any modern compiler would catch cases like this and give a warning. I just tested gcc and icc under OS X, and they both give a warning (gcc says "statement with no effect", icc says "expression has no effect").Cardoso wrote:I've done my share of those.
Tord
-
bob
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: Crafty 22.8
I think in my case it is just a symptom of being almost 61 years old...Cardoso wrote:I've done my share of those.
But it is unbelivable how we do these things.
Could it be that programming can cause things like alzhimer desease?
I'm saying this because I'm in a pretty bad shape.
I'm 42 and I just sleep 3-5 hours and medication don't help much.
I guess we live in a world we ain't suppose to live in, almost everything around us is bad.
best regards,
Alvaro
-
bob
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: Crafty 22.8
I used ICC, with all warnings enabled. I am not sure how that particular glitch happened.Tord Romstad wrote:What compiler(s) do you guys use? I thought any modern compiler would catch cases like this and give a warning. I just tested gcc and icc under OS X, and they both give a warning (gcc says "statement with no effect", icc says "expression has no effect").Cardoso wrote:I've done my share of those.
Tord
-
Tord Romstad
- Posts: 1808
- Joined: Wed Mar 08, 2006 9:19 pm
- Location: Oslo, Norway
Re: Crafty 22.8
I'm 34, and I can't even write syntactically correct C without using a cheat sheet. I never remember things like the operator precedence levels or where to put semicolons.bob wrote:I think in my case it is just a symptom of being almost 61 years old...Cardoso wrote:I've done my share of those.
But it is unbelivable how we do these things.
Could it be that programming can cause things like alzhimer desease?
I'm saying this because I'm in a pretty bad shape.
I'm 42 and I just sleep 3-5 hours and medication don't help much.
I guess we live in a world we ain't suppose to live in, almost everything around us is bad.
best regards,
Alvaro
Tord
-
Edsel Apostol
- Posts: 803
- Joined: Mon Jul 17, 2006 5:53 am
- Full name: Edsel Apostol
Re: Crafty 22.8
I'm 24 and I also can't memorize the operator precedence though I could write well in C without using any reference at all. I think what's important is not what you memorize or what data one have in his brain but rather the way on how to process this data.Tord Romstad wrote:I'm 34, and I can't even write syntactically correct C without using a cheat sheet. I never remember things like the operator precedence levels or where to put semicolons.bob wrote:I think in my case it is just a symptom of being almost 61 years old...Cardoso wrote:I've done my share of those.
But it is unbelivable how we do these things.
Could it be that programming can cause things like alzhimer desease?
I'm saying this because I'm in a pretty bad shape.
I'm 42 and I just sleep 3-5 hours and medication don't help much.
I guess we live in a world we ain't suppose to live in, almost everything around us is bad.
best regards,
Alvaro
Tord
Edsel Apostol
https://github.com/ed-apostol/InvictusChess
https://github.com/ed-apostol/InvictusChess
-
frankp
- Posts: 233
- Joined: Sun Mar 12, 2006 3:11 pm
Re: Crafty 22.8
One 'rule' I try to follow is
NULL == p
p = NULL
NULL == p
p = NULL