conditional





?: (conditional) \ Language (API) \ Processing 1.0
























Search processing.org:





Language (A-Z) \ Libraries \ Tools \ Environment \ Compare \ Troubleshooting






Reference for Processing version 1.0+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.

Name ?: (conditional) Examples int s = 0; for(int i = 5; i < 100; i += 5) { s = (i < 50) ? 0 : 255; stroke(s); line(30, i, 80, i); } Description A shortcut for writing an if and else structure. If the condition evaluates to true, expression1 is evaluated and returned. If the condition evaluates to false, expression2 is evaluated and returned. The following conditional: result = condition ? expression1 : expression2 is equivalent to this structure: if (condition) { result = expression1 } else { result = expression2 } Syntax condition ? expression1 : expression2 Parameters condition any valid expression which evaluates to true or false expression1 any valid expression expression2 any valid expression Returns Variable, dependent on the datatype of the expressions Usage Web & Application Related if()else

Updated on March 21, 2009 09:26:08am PDT












Processing was initiated by Ben Fry and Casey Reas. It is developed by a small team of volunteers.


© Info \

Site hosted by Media Temple!









Wyszukiwarka

Podobne podstrony:
conditions?0
1st conditional game
second conditional form
worksheet 7 first conditional
first conditional
Gems collection 1 Scrap and Tubes Scrap and Tubes PU CU TOU Conditions d utilisations PU CU Scra
2001 Conditioning For Martial Arts
SHSpec 62 6505C25 The Five Conditions
Fogelin, Robert J David Lewis on indicative and counterfactual conditionals
Condition
SHSpec 032 6107C20 Games Conditions
AbstractQueuedSynchronizer ConditionObject
Depeche Mode The Sweetest Condition
conditions?2
Bob Cassidy Lab Conditions(1)
materialy,gramatyka,3rd conditional trzeci tryb warunkowy
conditions?

więcej podobnych podstron