Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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.

 

 

  • No labels