{"name":"Control Structures","title":"Control Structures","type":"topic","url":"https://community.bistudio.com/wiki/Control_Structures","revid":363911,"updated":"2024-04-25T21:29:06Z","aliases":[],"markdown":"**Control Structures** are statements which are used to control execution flow in the scripts. They are sequences of scripting code which help to control complex procedures. You can use control structures to define code which is only executed under certain conditions or repeated for a couple of times.\n\n***Note for advanced readers:** in the Virtual Reality scripting language control structures are normal scripting commands, with no special handling compared to other commands. This is different from most imperative programming languages (like C), where control statements are implemented in the core language grammar. The \"controlling\" done by them is implemented by accepting code as an argument. The complex control structures like \"while ... do ...\" are implemented using helper types, like While Type.*\n\n### Requirements\n\nTo fully understand this article you should read the following articles:\n\n- Introduction to Arma Scripting\n- Variables\n- Operators\n\n### Conditional Structures\n\n**Conditional structures** help to define code which is only executed under certain circumstances. Often you will write code that depends on the game state, on other code or other conditions.\n\n#### `if`-Statement\n\nThe `if`-statement defines code that is only executed **if** a certain condition is met. The syntax of it looks like that:\n\n if (CONDITION) then `// The round braces are optional`\n {\n \tSTATEMENT;\n \t...\n };\n\n- `CONDITION` is a Boolean statement or variable which returns either `true` or `false`. The code nested in the following block is only executed if the condition is `true`, else ignored.\n- `STATEMENT` is a custom sequence of statements. That may be commands, assignments, control structures etc.\n\n**Example:**\n\n```sqf\nif (_temperature < 0) then\n{\n    hint \"Snow!\";\n};\n```\n\nIn this example, first the value of `_temperature` is checked:\n- If the value is 0 or greater than 0, the nested code is ignored.\n- If the value is less than 0, the command `hint \"Snow!\";` is executed.\n\n##### Alternative Code (else)\n\nYou can also define *alternative* code that is executed, when the condition is *not* `true`.\n\n if (CONDITION) then\n {\n \tSTATEMENT1;\n \t...\n }\n else\n {\n \tSTATEMENT2;\n \t...\n };\n\nAnother way of specifying an alternative code is done by feeding a 2-dimensional Array of Code into the then like this (but this alternative is CPU-heavier):\n\n if (CONDITION) then [{STATEMENT1; ...}, {STATEMENT2; ...}];\n\nIn fact the above syntax with the Array is the only possible syntax as else does nothing else than taking the code to its left and the one to its right and packs them both into an Array of Code which is then fed into the then operator. But using else is just as fine and in most cases better in case of readability of your code.\n\nHere you have a second sequence of statements executed when `CONDITION` is `false`.\n\n##### Conditional assignments\n\n`if..then` structures can also be used to assign conditional values to variables:\n\n```sqf\n_living = if (alive player) then { true } else { false };\n```\n\n##### SQS syntax (deprecated)\n\n> [!WARNING]\n> SQS Syntax is deprecated; SQF Syntax should be used instead.\n\nWithin SQS Syntax the use of goto labels is a way to execute more than one statement within if...then structures.\n\n if (CONDITION) then { goto \"label\" }\n ... some other statements\n #label\n   statement1\n   statement2\n   statement3\n\n**Example 1: (without else)**\n\n```sqs\nif (_temperature < 0) then { goto \"Snow\" }\n; ... some other statements\n\n#Snow\n  hint \"Snow!\"\n  echo \"There is snow!\"\n  variable = text \"Hey. Snow outside.\"\n```\n\n**Example 2: (with else)**\n\n```sqs\nif (_temperature < 0) then { goto \"Snow\" } else { goto \"Sunshine\" }\n; ... some other statements\ngoto \"Continue\"\n#Snow\n  hint \"Snow!\"\n  echo \"There is snow!\"\n  variable = text \"Hey. Snow outside.\"\n  goto \"Continue\"\n\n#Sunshine\n  hint \"No Snow but sunshine!\"\n  echo \"There is no snow!\"\n  variable = text \"Hey. No snow outside.\"\n  goto \"Continue\"\n\n#Continue\n; ...\n```\n\n##### Nested `if`-Statements\n\nSince the `if`-statement is itself a statement, you can also create **nested `if`-statements**.\n\n**Example:**\n\n```sqf\nif (alive player) then\n{\n    if (someAmmo player) then\n    {\n        hint \"The player is alive and has ammo!\";\n    }\n    else\n    {\n        hint \"The player is out of ammo!\";\n    };\n}\nelse\n{\n    hint \"The player is dead!\";\n};\n```\n\n#### `switch`-Statement (Armed Assault v1.00)\n\nIn some cases you may want to check a variable for several values and execute different code depending on the value.\nWith the above knowledge you could just write a sequence of `if`-statements.\n\n```sqf\nif (_color == \"blue\") then\n{\n    hint \"What a nice color\";\n}\nelse\n{\n    if (_color == \"red\") then\n    {\n        hint \"Don't you get aggressive?\";\n    }\n};\n```\n\nThe more values you want to compare, the longer gets this sequence. That is why the simplified `switch`-statement was introduced.\n\nThe `switch`-statement compares a variable against different values:\n\n switch (VARIABLE) do\n {\n \tcase VALUE1:\n \t{\n \t\tSTATEMENT;\n \t\t...\n \t};\n \tcase VALUE2:\n \t{\n \t\tSTATEMENT;\n \t\t...\n \t};\n \t...\n };\n\nThe structure compares `VARIABLE` against all given values (`VALUE1`, `VALUE2`, ...). If any of the values matches, the corresponding block of statements is executed.\n\n**Example:**\n\n```sqf\n[switch (_color) do\n{\n    case \"blue\":\n    {\n        hint \"What a nice color\";\n    };\n    case \"red\":\n    {\n        hint \"Don't you get aggressive?\";\n    };\n};\n```\n\n##### `default`-Block\n\nIn some cases you may want to define alternative code that is executed, when none of the values matches. You can write this code in a `default`-Block.\n\n switch (VARIABLE) do\n {\n \tcase VALUE1:\n \t{\n \t\tSTATEMENT;\n \t\t...\n \t};\n \tcase VALUE2:\n \t{\n \t\tSTATEMENT;\n \t\t...\n \t};\n \t...\n \tdefault `// No colon behind **default**`\n \t{\n \t\tSTATEMENT;\n \t\t...\n \t};\n };\n\n##### Variable Assignments\n\nSwitch can be used to assign different values to a variable:\n\n```sqf\nprivate _color = switch (side player) do\n{\n    case west: { \"ColorGreen\" };\n    case east: { \"ColorRed\" };\n};\n```\n\n### Loops\n\n**Loops** are used to execute the same code block for a specific or unspecific number of times.\n\n#### `while`-Loop\n\nThis loop repeats the same code block as long as a given Boolean condition is `true`.\n\n while {CONDITION} do `// Note the curly braces`\n {\n \tSTATEMENT;\n \t...\n };\n\n**Description:**\n\n1. `CONDITION` is evaluated. If it is `true`, go on to 2., else skip the block and go on with the code following the loop.\n1. Execution of all nested statements. Go back to 1.\n\nIf `CONDITION` is `false` from the beginning on, the statements within the block of the loop will never be executed.\n\nBecause the test of the while expression takes place before each execution of the loop, a while loop executes zero or more times.\n\n**Example:**\n\n```sqf\nprivate _counter = 0;\n\nwhile { _counter < 10 } do\n{\n    _counter = _counter + 1;\n};\n```\n\n#### `for`-Loop (Armed Assault v1.00)\n\nThe `for`-loop repeats the same code block for a specific number of times.\n\n for [{BEGIN}, {CONDITION}, {STEP}] do\n {\n \tSTATEMENT;\n \t...\n };\n\n- `BEGIN` is a number of statements executed *before* the loop starts\n- `CONDITION` is a Boolean condition evaluated *before* each loop\n- `STEP` is a number of statements executed *after* each loop\n\nThe loop processes as follows:\n\n1. `BEGIN` is executed\n1. `CONDITION` is evaluated. If it is `true`, go on to 3., else skip the block and go on with the code following the loop.\n1. The statements in the code block are executed\n1. `STEP` is executed, go on to 2.\n\nIf `CONDITION` is `false` from the beginning on, the code block will never be executed.\n\n**Example:**\n\n```sqf\nfor [{ _i = 0 }, { _i < 10 }, { _i = _i + 1 }] do // a loop repeating 10 times\n{\n    player globalChat format [\"%1\", _i];\n};\n```\n\nwill display \"0\" then \"1\" then \"2\" then \"3\" then \"4\" then \"5\" then \"6\" then \"7\" then \"8\" then \"9\".\n\n**Description:**\n1. The variable `_i` is set to 0\n1. The condition `_i < 10` is evaluated, which is `true` until `_i` surpasses 9.\n1. The code `player globalChat _i;` is executed\n1. The variable `_i` is incremented by 1, back to step 2.\n\n##### `for`-`from`-`to`-Loop\n\nThere exists an alternate syntax of the `for`-loop, which simplifies the last example a bit.\n\n for \"VARNAME\" from STARTVALUE to ENDVALUE do\n {\n \tSTATEMENT;\n \t...\n };\n\n- `VARNAME` is any name given to the variable used to count the loop\n- `STARTVALUE` is a Number value given to the counter variable before the loop starts\n- `ENDVALUE` is a Number value until which the counter is incremented\n\n> [!IMPORTANT]\n> Note: Unless using a custom step as seen below, ENDVALUE must be greater than STARTVALUE for the loop to execute\n\nThe loop processes as follows:\n\n1. A variable with the name `VARNAME` is initialized with `STARTVALUE`\n1. If `VARNAME` does not exceed `ENDVALUE`, the code block will be executed.\n1. The variable `VARNAME` is incremented by 1\n1. Go back to step 2\n\nThe following example is semantically equal to the last example.\n\n**Example:**\n\n```sqf\nfor \"_i\" from 0 to 9 do // a loop repeating 10 times\n{\n    player globalChat format [\"%1\", _i];\n};\n```\n\n**Description:**\n1. `_i` is set to 0\n1. `player globalChat 0` is executed\n1. `_i` is incremented by 1 => `_i` is now 1\n1. Back to step 2\n\n##### `for`-`from`-`to`-Loop with custom `step`\n\nThe default step to increment the variable in `for`-`from`-`to`-Loops is 1. You can set a custom step though using this syntax:\n\n for \"VARNAME\" from STARTVALUE to ENDVALUE step STEP do\n {\n \tSTATEMENT;\n \t...\n };\n\n- `STEP` is a Number which defines the step by which the variable is incremented every loop\n\n> [!IMPORTANT]\n> Note: Utilizing this method, you can perform loops where VARNAME decrements by using a negative step value combined with a STARTVALUE that is greater than ENDVALUE\n\nThe rest is equal to the above section.\n\n**Example:**\n\n```sqf\nfor \"_i\" from 0 to 9 step 2 do // a loop repeating 5 times\n{\n    player globalChat format [\"%1\", _i];\n};\n```\n\n**Description:**\n\n1. `_i` is set to 0\n1. `player globalChat 0` is executed\n1. `_i` is incremented by 2 => `_i` is now 2\n1. Back to step 2\n\n#### `forEach`-Loop\n\nYou will often use the `forEach`-loop to increment over arrays.\nIt repeats the same code block for every item in an array.\n\n {\n \tSTATEMENT;\n \t...\n } forEach ARRAY;\n\nThe code block is executed exactly `(count ARRAY)` times.\n\nYou may use the magic variable `_x` within the code block, which always references to the current item of the array.\nMagic variable `_foreachindex` contains current index of the _x element in ARRAY.\n\n**Example:**\n\n```sqf\nprivate _array = [unit1, unit2, unit3];\n\n{\n    _x setDamage 1;\n}\nforEach _array;\n```\n\n**Description:**\n1. In the first loop, the statement `unit1 setDamage 1;` is executed\n1. In the second loop, the statement `unit2 setDamage 1;` is executed\n1. In the third loop, the statement `unit3 setDamage 1;` is executed\n\n> [!WARNING]\n> Each iteration will be executed within one frame, even if it consists of multiple instructions. So be aware of large and/or complex code blocks!\n\n### Return Values\n\nControl structures always return the **last expression evaluated** within the structure.\n\n**Example:**\n\n```sqf\nif (myCondition) then { myValueA; } else { myValueB; }; // returns myValueA or myValueB\n```\n\n### See Also\n\n- Command Group: Program Flow\n- Statement\n- Expression","sections":[{"heading":null,"level":1,"markdown":"**Control Structures** are statements which are used to control execution flow in the scripts. They are sequences of scripting code which help to control complex procedures. You can use control structures to define code which is only executed under certain conditions or repeated for a couple of times.\n\n***Note for advanced readers:** in the Virtual Reality scripting language control structures are normal scripting commands, with no special handling compared to other commands. This is different from most imperative programming languages (like C), where control statements are implemented in the core language grammar. The \"controlling\" done by them is implemented by accepting code as an argument. The complex control structures like \"while ... do ...\" are implemented using helper types, like While Type.*"},{"heading":"Requirements","level":3,"markdown":"To fully understand this article you should read the following articles:\n\n- Introduction to Arma Scripting\n- Variables\n- Operators"},{"heading":"Conditional Structures","level":3,"markdown":"**Conditional structures** help to define code which is only executed under certain circumstances. Often you will write code that depends on the game state, on other code or other conditions."},{"heading":"`if`-Statement","level":4,"markdown":"The `if`-statement defines code that is only executed **if** a certain condition is met. The syntax of it looks like that:\n\n if (CONDITION) then `// The round braces are optional`\n {\n \tSTATEMENT;\n \t...\n };\n\n- `CONDITION` is a Boolean statement or variable which returns either `true` or `false`. The code nested in the following block is only executed if the condition is `true`, else ignored.\n- `STATEMENT` is a custom sequence of statements. That may be commands, assignments, control structures etc.\n\n**Example:**\n\n```sqf\nif (_temperature < 0) then\n{\n    hint \"Snow!\";\n};\n```\n\nIn this example, first the value of `_temperature` is checked:\n- If the value is 0 or greater than 0, the nested code is ignored.\n- If the value is less than 0, the command `hint \"Snow!\";` is executed."},{"heading":"Alternative Code (else)","level":5,"markdown":"You can also define *alternative* code that is executed, when the condition is *not* `true`.\n\n if (CONDITION) then\n {\n \tSTATEMENT1;\n \t...\n }\n else\n {\n \tSTATEMENT2;\n \t...\n };\n\nAnother way of specifying an alternative code is done by feeding a 2-dimensional Array of Code into the then like this (but this alternative is CPU-heavier):\n\n if (CONDITION) then [{STATEMENT1; ...}, {STATEMENT2; ...}];\n\nIn fact the above syntax with the Array is the only possible syntax as else does nothing else than taking the code to its left and the one to its right and packs them both into an Array of Code which is then fed into the then operator. But using else is just as fine and in most cases better in case of readability of your code.\n\nHere you have a second sequence of statements executed when `CONDITION` is `false`."},{"heading":"Conditional assignments","level":5,"markdown":"`if..then` structures can also be used to assign conditional values to variables:\n\n```sqf\n_living = if (alive player) then { true } else { false };\n```"},{"heading":"SQS syntax (deprecated)","level":5,"markdown":"> [!WARNING]\n> SQS Syntax is deprecated; SQF Syntax should be used instead.\n\nWithin SQS Syntax the use of goto labels is a way to execute more than one statement within if...then structures.\n\n if (CONDITION) then { goto \"label\" }\n ... some other statements\n #label\n   statement1\n   statement2\n   statement3\n\n**Example 1: (without else)**\n\n```sqs\nif (_temperature < 0) then { goto \"Snow\" }\n; ... some other statements\n\n#Snow\n  hint \"Snow!\"\n  echo \"There is snow!\"\n  variable = text \"Hey. Snow outside.\"\n```\n\n**Example 2: (with else)**\n\n```sqs\nif (_temperature < 0) then { goto \"Snow\" } else { goto \"Sunshine\" }\n; ... some other statements\ngoto \"Continue\"\n#Snow\n  hint \"Snow!\"\n  echo \"There is snow!\"\n  variable = text \"Hey. Snow outside.\"\n  goto \"Continue\"\n\n#Sunshine\n  hint \"No Snow but sunshine!\"\n  echo \"There is no snow!\"\n  variable = text \"Hey. No snow outside.\"\n  goto \"Continue\"\n\n#Continue\n; ...\n```"},{"heading":"Nested `if`-Statements","level":5,"markdown":"Since the `if`-statement is itself a statement, you can also create **nested `if`-statements**.\n\n**Example:**\n\n```sqf\nif (alive player) then\n{\n    if (someAmmo player) then\n    {\n        hint \"The player is alive and has ammo!\";\n    }\n    else\n    {\n        hint \"The player is out of ammo!\";\n    };\n}\nelse\n{\n    hint \"The player is dead!\";\n};\n```"},{"heading":"`switch`-Statement (Armed Assault v1.00)","level":4,"markdown":"In some cases you may want to check a variable for several values and execute different code depending on the value.\nWith the above knowledge you could just write a sequence of `if`-statements.\n\n```sqf\nif (_color == \"blue\") then\n{\n    hint \"What a nice color\";\n}\nelse\n{\n    if (_color == \"red\") then\n    {\n        hint \"Don't you get aggressive?\";\n    }\n};\n```\n\nThe more values you want to compare, the longer gets this sequence. That is why the simplified `switch`-statement was introduced.\n\nThe `switch`-statement compares a variable against different values:\n\n switch (VARIABLE) do\n {\n \tcase VALUE1:\n \t{\n \t\tSTATEMENT;\n \t\t...\n \t};\n \tcase VALUE2:\n \t{\n \t\tSTATEMENT;\n \t\t...\n \t};\n \t...\n };\n\nThe structure compares `VARIABLE` against all given values (`VALUE1`, `VALUE2`, ...). If any of the values matches, the corresponding block of statements is executed.\n\n**Example:**\n\n```sqf\n[switch (_color) do\n{\n    case \"blue\":\n    {\n        hint \"What a nice color\";\n    };\n    case \"red\":\n    {\n        hint \"Don't you get aggressive?\";\n    };\n};\n```"},{"heading":"`default`-Block","level":5,"markdown":"In some cases you may want to define alternative code that is executed, when none of the values matches. You can write this code in a `default`-Block.\n\n switch (VARIABLE) do\n {\n \tcase VALUE1:\n \t{\n \t\tSTATEMENT;\n \t\t...\n \t};\n \tcase VALUE2:\n \t{\n \t\tSTATEMENT;\n \t\t...\n \t};\n \t...\n \tdefault `// No colon behind **default**`\n \t{\n \t\tSTATEMENT;\n \t\t...\n \t};\n };"},{"heading":"Variable Assignments","level":5,"markdown":"Switch can be used to assign different values to a variable:\n\n```sqf\nprivate _color = switch (side player) do\n{\n    case west: { \"ColorGreen\" };\n    case east: { \"ColorRed\" };\n};\n```"},{"heading":"Loops","level":3,"markdown":"**Loops** are used to execute the same code block for a specific or unspecific number of times."},{"heading":"`while`-Loop","level":4,"markdown":"This loop repeats the same code block as long as a given Boolean condition is `true`.\n\n while {CONDITION} do `// Note the curly braces`\n {\n \tSTATEMENT;\n \t...\n };\n\n**Description:**\n\n1. `CONDITION` is evaluated. If it is `true`, go on to 2., else skip the block and go on with the code following the loop.\n1. Execution of all nested statements. Go back to 1.\n\nIf `CONDITION` is `false` from the beginning on, the statements within the block of the loop will never be executed.\n\nBecause the test of the while expression takes place before each execution of the loop, a while loop executes zero or more times.\n\n**Example:**\n\n```sqf\nprivate _counter = 0;\n\nwhile { _counter < 10 } do\n{\n    _counter = _counter + 1;\n};\n```"},{"heading":"`for`-Loop (Armed Assault v1.00)","level":4,"markdown":"The `for`-loop repeats the same code block for a specific number of times.\n\n for [{BEGIN}, {CONDITION}, {STEP}] do\n {\n \tSTATEMENT;\n \t...\n };\n\n- `BEGIN` is a number of statements executed *before* the loop starts\n- `CONDITION` is a Boolean condition evaluated *before* each loop\n- `STEP` is a number of statements executed *after* each loop\n\nThe loop processes as follows:\n\n1. `BEGIN` is executed\n1. `CONDITION` is evaluated. If it is `true`, go on to 3., else skip the block and go on with the code following the loop.\n1. The statements in the code block are executed\n1. `STEP` is executed, go on to 2.\n\nIf `CONDITION` is `false` from the beginning on, the code block will never be executed.\n\n**Example:**\n\n```sqf\nfor [{ _i = 0 }, { _i < 10 }, { _i = _i + 1 }] do // a loop repeating 10 times\n{\n    player globalChat format [\"%1\", _i];\n};\n```\n\nwill display \"0\" then \"1\" then \"2\" then \"3\" then \"4\" then \"5\" then \"6\" then \"7\" then \"8\" then \"9\".\n\n**Description:**\n1. The variable `_i` is set to 0\n1. The condition `_i < 10` is evaluated, which is `true` until `_i` surpasses 9.\n1. The code `player globalChat _i;` is executed\n1. The variable `_i` is incremented by 1, back to step 2."},{"heading":"`for`-`from`-`to`-Loop","level":5,"markdown":"There exists an alternate syntax of the `for`-loop, which simplifies the last example a bit.\n\n for \"VARNAME\" from STARTVALUE to ENDVALUE do\n {\n \tSTATEMENT;\n \t...\n };\n\n- `VARNAME` is any name given to the variable used to count the loop\n- `STARTVALUE` is a Number value given to the counter variable before the loop starts\n- `ENDVALUE` is a Number value until which the counter is incremented\n\n> [!IMPORTANT]\n> Note: Unless using a custom step as seen below, ENDVALUE must be greater than STARTVALUE for the loop to execute\n\nThe loop processes as follows:\n\n1. A variable with the name `VARNAME` is initialized with `STARTVALUE`\n1. If `VARNAME` does not exceed `ENDVALUE`, the code block will be executed.\n1. The variable `VARNAME` is incremented by 1\n1. Go back to step 2\n\nThe following example is semantically equal to the last example.\n\n**Example:**\n\n```sqf\nfor \"_i\" from 0 to 9 do // a loop repeating 10 times\n{\n    player globalChat format [\"%1\", _i];\n};\n```\n\n**Description:**\n1. `_i` is set to 0\n1. `player globalChat 0` is executed\n1. `_i` is incremented by 1 => `_i` is now 1\n1. Back to step 2"},{"heading":"`for`-`from`-`to`-Loop with custom `step`","level":5,"markdown":"The default step to increment the variable in `for`-`from`-`to`-Loops is 1. You can set a custom step though using this syntax:\n\n for \"VARNAME\" from STARTVALUE to ENDVALUE step STEP do\n {\n \tSTATEMENT;\n \t...\n };\n\n- `STEP` is a Number which defines the step by which the variable is incremented every loop\n\n> [!IMPORTANT]\n> Note: Utilizing this method, you can perform loops where VARNAME decrements by using a negative step value combined with a STARTVALUE that is greater than ENDVALUE\n\nThe rest is equal to the above section.\n\n**Example:**\n\n```sqf\nfor \"_i\" from 0 to 9 step 2 do // a loop repeating 5 times\n{\n    player globalChat format [\"%1\", _i];\n};\n```\n\n**Description:**\n\n1. `_i` is set to 0\n1. `player globalChat 0` is executed\n1. `_i` is incremented by 2 => `_i` is now 2\n1. Back to step 2"},{"heading":"`forEach`-Loop","level":4,"markdown":"You will often use the `forEach`-loop to increment over arrays.\nIt repeats the same code block for every item in an array.\n\n {\n \tSTATEMENT;\n \t...\n } forEach ARRAY;\n\nThe code block is executed exactly `(count ARRAY)` times.\n\nYou may use the magic variable `_x` within the code block, which always references to the current item of the array.\nMagic variable `_foreachindex` contains current index of the _x element in ARRAY.\n\n**Example:**\n\n```sqf\nprivate _array = [unit1, unit2, unit3];\n\n{\n    _x setDamage 1;\n}\nforEach _array;\n```\n\n**Description:**\n1. In the first loop, the statement `unit1 setDamage 1;` is executed\n1. In the second loop, the statement `unit2 setDamage 1;` is executed\n1. In the third loop, the statement `unit3 setDamage 1;` is executed\n\n> [!WARNING]\n> Each iteration will be executed within one frame, even if it consists of multiple instructions. So be aware of large and/or complex code blocks!"},{"heading":"Return Values","level":3,"markdown":"Control structures always return the **last expression evaluated** within the structure.\n\n**Example:**\n\n```sqf\nif (myCondition) then { myValueA; } else { myValueB; }; // returns myValueA or myValueB\n```"},{"heading":"See Also","level":3,"markdown":"- Command Group: Program Flow\n- Statement\n- Expression"}],"categories":["Syntax"],"groups":["Scripting"]}