Conditional command if
Conditional command if (For modes 2D, 3D, Console)
Provides branching of program according to actual value of given condition.
Was this helpful?
Else (For modes 2D, 3D, Console)
Optional part of conditional expression, that is executed when preceding condition is false.
Was this helpful?
Syntax:
if(condition){command}else{command}
Example (For modes 2D, 3D)
If the value of variable i is 0, Baltie takes two steps, else turns left.
Was this helpful?
Conditional command switch
Conditional command switch (For modes 2D, 3D, Console)
Enables program branching according to value of given expression.
Was this helpful?
Case (For modes 2D, 3D, Console)
Item of conditional command switch.
Was this helpful?
Default (For modes 2D, 3D, Console)
Optional item of conditional command switch. It is executed when none of case items is matched.
Was this helpful?
Syntax:
switch(expression){
 casevalue{command}
 .
 .
 .
 casevalue{command}
 default{command}
}
Example (For mode 3D)
Was this helpful?
Ternary operator ? :
Ternary operator ? : (For modes 2D, 3D, Console)
Evaluates condition and returns value of the first or the second expression according to evaluating condition as true or false.
Syntax:
conditional expression?first expression:second expression
Was this helpful?
Was this helpful?


Did you find this information useful?
Documentation of SGP Baltie 4 C#
Send us comments on this topic by this form ©1978-2010 SGP Systems

Parent page | Previous page | Next page