What a frustration!
-
I aimed in a program to check that if x = y I wrote it as : If x<>y I reviewed the code and ran the program, but it didn’t work. After several tries I went back to the code. I surprised how I wrote this when I intended the opposite.
-
Don't give DD ideas.
I wanna be a eunuchs developer! Pass me a bread knife!
It was actually in a retail banking system. :-\
speramus in juniperus
-
I aimed in a program to check that if x = y I wrote it as : If x<>y I reviewed the code and ran the program, but it didn’t work. After several tries I went back to the code. I surprised how I wrote this when I intended the opposite.
We've all done something like that.... But usually you swap > and < .... :-D
There are no secrets to success. It is the result of preparation, hard work, and learning from failure. Colin Powell
-
I've done worse (as have most people) in C / C++:
if (a = b)
...Or
a == b * 3;
You do feel a right fool when you finally spot it. Normally after a few hours of head scratching...and swearing, of course.
The only instant messaging I do involves my middle finger. English doesn't borrow from other languages. English follows other languages down dark alleys, knocks them over and goes through their pockets for loose grammar.
-
Tarek Elqusi wrote:
<>
This tells a lot about it... :rolleyes:
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus Do not feed the troll ! - Common proverb
I coded this in VFP9
-
I coded this in VFP9
-
Both caught by warnings, I think. But, hell, who looks at warnings ? :rolleyes:
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus Do not feed the troll ! - Common proverb
Depends on the compiler: they are both valid C, so some systems (particularly older ones) don;t even flag it up as a warning. :doh: And of course, I read what I meant to write... :laugh: With VS, my modified project templates turn "Treat warnings as errors" on to prevent me ignoring them! ;)
The only instant messaging I do involves my middle finger. English doesn't borrow from other languages. English follows other languages down dark alleys, knocks them over and goes through their pockets for loose grammar.
-
I've done worse, even commented what was supposed to happen, something like:
void adjustBalance(boolean credit, long amount)
{
// if the amount is negative reverse the direction:
if (amount > 0)
{
adjustBalance(!credit, -amount);
}// proper transaction
}speramus in juniperus
Nagy Vilmos wrote:
void adjustBalance(boolean credit, long amount)
Why, you must work for the US Govt! I think they have code like that for balancing the budget. :) Marc
-
I aimed in a program to check that if x = y I wrote it as : If x<>y I reviewed the code and ran the program, but it didn’t work. After several tries I went back to the code. I surprised how I wrote this when I intended the opposite.
-
I've done worse (as have most people) in C / C++:
if (a = b)
...Or
a == b * 3;
You do feel a right fool when you finally spot it. Normally after a few hours of head scratching...and swearing, of course.
The only instant messaging I do involves my middle finger. English doesn't borrow from other languages. English follows other languages down dark alleys, knocks them over and goes through their pockets for loose grammar.
That's at least one good thing about Delphi (and Pascal in general). := is assignment. = is equivalence. Lots of other things you can screw up but not the assignment vs equivalence error.