Top "Control-structure" questions

Within an imperative programming language, a control flow statement is a statement whose execution results in a choice being made as to which of two or more paths should be followed.

PHP "or" Syntax

I've seen this a lot: $fp = fopen($filepath, "w") or die(); But I can't seem to find any real documentation …

php syntax program-flow control-structure or-operator
for loop vs while loop vs foreach loop PHP

1st off I'm new to PHP. I have been using for loop,while loop,foreach loop in scripts. I wonder …

php performance loops nested-loops control-structure
SQL loop WHILE IF BREAK

In a SQL Server 2012 stored procedure, I have several nested structures. I want to break out of a single layer …

sql-server control-structure
What is the meaning of "break 2"?

I always used and seen examples with just "break". What is the meaning of this: <?php while ($flavor = "chocolate") { …

php break control-structure
'break' from a switch, then 'continue' in a loop

Is it possible to break from a switch and then continue in a loop? For example: $numbers= array(1,2,3,4,5,6,7,8,9,0); $letters = array(…

php control-structure
How to implement decision matrix in c#

I need to make a decision based on a rather large set of 8 co-dependent conditions. | A | B | C | D | E | …

c# matrix logic decision-tree control-structure
Useful alternative control structures?

Sometimes when I am programming, I find that some particular control structure would be very useful to me, but is …

loops programming-languages control-structure
Do if(){ } while() statement

I am currently working on somebody's else code, with a statement like this if(x.start()) do if(y.foo(…

c++ do-while control-structure
Python - If not statement with 0.0

I have a question regarding if not statement in Python 2.7. I have written some code and used if not statements. …

python python-2.7 if-statement control-structure