View Single Post
  #18  
Old 11-08-2007, 06:14 AM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
Quote:
Originally Posted by Switch View Post
what does the ? do EXACTLY
? separates the condition from two statements that could be made:
condition?statements;

Quote:
Originally Posted by Switch View Post
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.
__________________
◕‿‿◕ · pfa · check yer syntax! · src

Killa Be: when i got that locker in 6th grade the only thing in it was a picture of a midget useing a firehose :/
Reply With Quote