Quote:
Originally Posted by Switch
what does the ? do EXACTLY
|
? separates the condition from two statements that could be made:
condition?
statements;
Quote:
Originally Posted by Switch
what does the : do EXACTLY?
|
: separates the two statements apart from one another:
statement1:
statement2
All they do is tell the computer where one piece ends and another starts. Both the ? and the : need to be present for the operator to function correctly.
They can also be nested:
a?b?c:d:e is "translated" into a?(b?c:d):e
You will always have #
statements = #
conditions + 1.