(Condition)Statement: Condition, Type: Supporting
Flag
Format: initial-condition-statement Flag "flag-name" boolean-text
where
-
initial-condition-statement = any valid condition statement that use these identifiers listed below
-
flag-name = the text name of the data flag enclosed in quotation marks " " that will used to reference this record.
-
boolean-text = either a constant True or False text word.
-
True: converts the text word to a boolean true indicator
-
False: converts the text word to a boolean false indicator
-
Description
The Flag identifier reads the flag-name and creates a data flag if it does not already exist. This instructs the designed system that you are referencing the state field of the record that contains a boolean value of either true or false.
When using the Flag identifier in a condition statement, you are comparing the state value of the data flag to one of the outcomes of the boolean-text. If boolean-text matches the state value of the data flag, the condition is evaluated as true the program control is passed to the body of the condition block.
For more information, see Data Flags, Set Flag.
Example
Before we can place bets on our special numbers, we need to check the condition of our data flag ready to bet. If the state value of flag ready to bet is true, the condition statement will be evaluated as true and the action statements will be executed. The following example will perform this task.
RX Script | Copy Code |
---|---|
If Flag "ready to bet" is True begin Put 5 units on List [Number 13, Number 12, Number 19, Number 0] end |