Buy Brownie Points
Forumwarz is the first "Massively Single-Player" online RPG completely built around Internet culture.

You are currently looking at Flamebate, our community forums. Players can discuss the game here, strategize, and role play as their characters.

You need to be logged in to post and to see the uncensored versions of these forums.

Log in or Learn about Forumwarz

Civil Discussion
Switch to Role-Playing Civil Discussion
Wheels Hey JMac's got another programming question

Johnny Mac

Avatar: 37704 2022-12-12 08:49:44 +0000
66

[Full of SbumSS]

Level 60 Troll

I grant you an bumhole x

This is C#, but I’m sure this crosses over into a few other languages.

I’m just confused if and how a conditional-and (&&) logical operator works differently than just the and (&) operator.

Conditional means that it only checks the first value if necessary, but both should always be necessary in any and statement, conditional or not, since and returns true only id both statements are true.

It’s like mixing an ‘or’ with an ‘and’ making the ‘or’ useless imo.

Johnny Mac

Avatar: 37704 2022-12-12 08:49:44 +0000
66

[Full of SbumSS]

Level 60 Troll

I grant you an bumhole x

Oh no **** nevermind.

Johnny Mac

Avatar: 37704 2022-12-12 08:49:44 +0000
66

[Full of SbumSS]

Level 60 Troll

I grant you an bumhole x

Closet of shame

Johnny Mac

Avatar: 37704 2022-12-12 08:49:44 +0000
66

[Full of SbumSS]

Level 60 Troll

I grant you an bumhole x

O hay another question i don’t know the answer to

Why should we test for both upper and lowercase letters or use ToUpper( ) to convert letters to uppercase?

tracylee

Avatar: 121691 2010-01-07 13:53:31 -0500
11

Level 35 Hacker

“43 4f 44 45 20 4d 41 53 54 45 52”

Johnny Mac Posted:

O hay another question i don’t know the answer to

Why should we test for both upper and lowercase letters or use ToUpper( ) to convert letters to uppercase?

From what I’ve found, it’s a matter of an easier comparison, regardless of what a user types. If you are asking for…say…pet’s name, and the person doesn’t remember if the original contained an initial cap, then you’d convert the initial response and the new response to all caps and compare the two.

It appears that in string comparisons in C#, as in many languages, “Text” and “teXt” are not equal.

man-man

Avatar: 156485 2010-01-24 16:36:14 -0500
24

[Harem and Sushi Bar]

Level 69 Hacker

Selfish fine upstanding member of society

Johnny Mac Posted:

Oh no **** nevermind.

Now you’ve got me interested… what was the answer?

Johnny Mac

Avatar: 37704 2022-12-12 08:49:44 +0000
66

[Full of SbumSS]

Level 60 Troll

I grant you an bumhole x

man-man Posted:

Now you’ve got me interested… what was the answer?

It’s just if the first statement in the && is false, it doesn’t bother checking the second at all. & would check both anyway.

In my mind I only ran through true-true and true-false scenarios.

man-man

Avatar: 156485 2010-01-24 16:36:14 -0500
24

[Harem and Sushi Bar]

Level 69 Hacker

Selfish fine upstanding member of society

I was making the same mistake… Log in to see images!

Internet Delay Chat
Have fun playing!
To chat with other players, you must Join Forumwarz or Log In now!