UDM - if Statement - Nested Conditionals

UDM - if Statement - Nested Conditionals

For complex and powerful operations, if statements can be nested inside of each other.

Example

For example:

 


A Stonebranch Tip

Indenting lines underneath conditionals by putting spaces at the front of them, although not necessary, provides a visual cue that those lines are to be executed due to the evaluation of a conditional.

Using this technique with nested conditionals provides an easy way to tell at which 'level' each of the commands belong.

In addition, leaving a blank line before and after a conditional (not required by UDM) provides a way to visually indicate a block of related script commands.

This improves the readability and maintainability of scripts in the future.