Bookshelf Home | Contents | Index | PDF |
Siebel eScript Language Reference > Siebel eScript Language Overview > Operators in Siebel eScript > Conditional Operator in Siebel eScriptThe conditional operator, a question mark, provides a shorthand method for writing test_expression ? expression_if_true : expression_if_false First, test_expression is evaluated. If test_expression is true, then expression_if_true is evaluated, and the value of the entire expression is replaced by the value of expression_if_true. If test_expression is false, then expression_if_false is evaluated, and the value of the entire expression is that of expression_if_false. The following fragments illustrate the use of the conditional operator: In the previous statement foo is set to 100, because the expression is true. TheApplication().RaiseErrorText("Name is " + ((null==name) ? "unknown" : name)); In the previous statement, the message box displays |
Siebel eScript Language Reference |