Bookshelf Home | Contents | Index | PDF |
Siebel eScript Language Reference > Using Siebel eScript > Using Operators in Siebel eScript > Using Less Code to Write an Else StatementThe conditional operator is a type of operator that allows you to use less code when you write an Else statement. A statement that includes a conditional operator is more difficult to read than an If The following format illustrates how the question mark (?) represents the conditional operator: variable = expressionA ? expressionC : expressionC
To use less code to write an Else statement Examples of Using the Conditional OperatorIn the following example, the expression is true and Siebel eScript sets the value of variableA to 100: variableA = ( 5 < 6 ) ? 100 : 200; Consider the following example: TheApplication().RaiseErrorText("Name is " + ((null==name) ? "unknown" : name)); |
Siebel eScript Language Reference | Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |