vcIfStatement
A vcIfStatement is a robot statement that execute one of two scopes of statements based on a condition. If the condition is true, the statement executes its ThenScope of statements. If the condition is false, the statement executes is ElseScope of statements. In robot programming, you can also add one or more ElseIfScopes (vcElseIfScope) between ThenScope and ElseScope.
Inherits: vcStatement
Properties
Name | Type | Access | Description |
Condition |
Expression |
RW | Defines an expression that when evaluated returns a True or False value.
A True value means the statement will execute its ThenScope of statements. A False value means the statement will execute its ElseScope of statements. |
ThenScope | vcScope | R | Gets the scope of statements executed by the statement if Condition is true. |
ElseIfScopes | List of vcElseIfScope | R | Gets a list of ElseIfScopes in the statement. |
ElseScope | vcScope | R | Gets the scope of statements executed by the statement if Condition is false. |
Methods
Name | Return Type | Parameters | Description |
addElseIfScope |
[Integer index] |
Adds vcElseIfScope to the statement and returns that scope. The default value of index is -1, so a new vcElseIfScope is inserted immediately before ElseScope. |
|
deleteElseIfScope |
None |
vcElseIfScope scope |
Deletes given scope from the statement. |