Top "If-statement" questions

An "if" statement is a flow control structure in most programming languages that branches execution flow depending on a binary condition, generally evaluated at runtime.

An "and" operator for an "if" statement in Bash

I'm trying to create a simple Bash script to check if the website is down and for some reason the "…

bash if-statement
If statement with String comparison fails

I really don't know why the if statement below is not executing: if (s == "/quit") { System.out.println("quitted"); } Below …

java multithreading if-statement string-comparison
if checkbox is checked, do this

When I check a checkbox, I want it to turn <p> #0099ff. When I uncheck the checkbox, I …

jquery checkbox if-statement checked unchecked
How to check the exit status using an if statement

I was wondering what would be the best way to check the exit status in an if statement in order …

bash shell if-statement error-handling
Is "else if" faster than "switch() case"?

I'm an ex Pascal guy, currently learning C#. My question is the following: Is the code below faster than making …

c# performance if-statement switch-statement
"elseif" syntax in JavaScript

How can I achieve an elseif in a JavaScript condition?

javascript if-statement syntax
If statement in select (ORACLE)

Hi I have simply select and works great: select 'CARAT Issue Open' issue_comment, i.issue_id, i.issue_status, …

sql oracle select if-statement oracle10g
MySQL IF NOT NULL, then display 1, else display 0

I'm working with a little display complication here. I'm sure there's an IF/ELSE capability I'm just overlooking. I have 2 …

mysql if-statement
IF... OR IF... in a windows batch file

Is there a way to write an IF OR IF conditional statement in a windows batch-file? For example: IF [%var%] == [1] …

windows batch-file if-statement cmd conditional
Checking for NULL pointer in C/C++

In a recent code review, a contributor is trying to enforce that all NULL checks on pointers be performed in …

c++ c if-statement null coding-style