Declaring and Setting Variables

Attribute(s)

  • Declaring/Setting Variables

    Description

    Declare Variables local . Follow the standards described in the Details field. Use parameters to call subs and functions

    Motivation

    These standards will help to give functions and subs their own responsibility, and will help to build reusable scripts

    Example / Details

    Always declare your variables locally, for the following reasons:
    - it is easier to understand the purpose of the Functions and Subs
    - independent Subs and Functions are easier to reuse
    - it is easier to understand where values of variables are set
    - better overview of used variables when you are debugging your script

    When you will use Global access to data in your script, use classes.