The EGL if statement
runs a set of statements if and only if a logical expression resolves
to true. The optional keyword else marks
the start of an alternative set of statements that run only if the
logical expression resolves to false.
Syntax
- label
- A label that an exit statement can reference.
- logicalExpression
- An expression that resolves to true or false.
- statement
- An EGL statement.
The following if statement runs in
a Rich UI application:
if (myRadioGroup.selected == "Tuesday")
myTextArea.text = "No, on Monday!";
else
myTextArea.text = "No, on Tuesday!";
end
The code assigns a string to a text area in response
to the user’s selection of one or another radio button in a radio
group.
Compatibility
Table 1. Compatibility
Target |
Issue |
Java |
No issues |
JavaScript |
No issues.
|