Ha ha
-
if ((a == a) || (a != a))
{
MessageBox.Show("That is correct, well done!!!");
}:laugh: WTF?
There are 10 types of people in the world, those who understand binary and those who dont.
:laugh: Strange that the author of the code didn't write this:
if ((a == a)) { MessageBox.Show("That is correct, well done!!!"); }
-
:laugh: Strange that the author of the code didn't write this:
if ((a == a)) { MessageBox.Show("That is correct, well done!!!"); }
-
if ((a == a) || (a != a))
{
MessageBox.Show("That is correct, well done!!!");
}:laugh: WTF?
There are 10 types of people in the world, those who understand binary and those who dont.
-
if ((a == a) || (a != a))
{
MessageBox.Show("That is correct, well done!!!");
}:laugh: WTF?
There are 10 types of people in the world, those who understand binary and those who dont.
-
The ones I find really silly and I see quite often in our codeset are like boolIsFive = val = "5" ? true : false Correction: boolIsFive = val == "5" ? true : false; -- modified at 8:14 Wednesday 6th June, 2007
Author, SharpDeveloper.NET
-
:laugh: Strange that the author of the code didn't write this:
if ((a == a)) { MessageBox.Show("That is correct, well done!!!"); }
"if (a == a)" actually has a meaning if a is of type double: double.NaN isn't equal to itself. Try it.
-
"if (a == a)" actually has a meaning if a is of type double: double.NaN isn't equal to itself. Try it.
maybe, but if that's the only case is there a way to test if a double is NaN directly? That'd be safer than hoping a clueless maintainance programmer wouldn't delete the explanatory comment as unneeded clutter on one update and then remove the
if (a == a)
test as useless on the next pass.-- You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer
-
maybe, but if that's the only case is there a way to test if a double is NaN directly? That'd be safer than hoping a clueless maintainance programmer wouldn't delete the explanatory comment as unneeded clutter on one update and then remove the
if (a == a)
test as useless on the next pass.-- You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer
That's why System.Double contains the method
public static bool IsNaN(double d) { return d != d; }
-
The ones I find really silly and I see quite often in our codeset are like boolIsFive = val = "5" ? true : false Correction: boolIsFive = val == "5" ? true : false; -- modified at 8:14 Wednesday 6th June, 2007
Author, SharpDeveloper.NET
-
The ones I find really silly and I see quite often in our codeset are like boolIsFive = val = "5" ? true : false Correction: boolIsFive = val == "5" ? true : false; -- modified at 8:14 Wednesday 6th June, 2007
Author, SharpDeveloper.NET
Sameer Alibhai wrote:
bool IsFive = val = "5" ? true : false
You know the intern that produces this? You could tell him the secret hack
bool IsFive = (val == "5");
I presume the assignment of "5" was a typo?
Failure is not an option - it's built right in.
-
Sameer Alibhai wrote:
I see quite often in our codeset
:~
Constantly "Saving the day" should be taken as a sign of organizational dysfunction rather than individual skill - Ryan Roberts[^]
Point well taken.
Author, SharpDeveloper.NET
-
Sameer Alibhai wrote:
bool IsFive = val = "5" ? true : false
You know the intern that produces this? You could tell him the secret hack
bool IsFive = (val == "5");
I presume the assignment of "5" was a typo?
Failure is not an option - it's built right in.
That is correct, thank you. Here's the VB.net version btnSubmit.Visible = IIf(_mode = "Read", false, true)
Author, SharpDeveloper.NET
-
if ((a == a) || (a != a))
{
MessageBox.Show("That is correct, well done!!!");
}:laugh: WTF?
There are 10 types of people in the world, those who understand binary and those who dont.
When it will not execute? Answer is a = 10 and a = 11
Regards, Sylvester G sylvester_g_m@yahoo.com