Scope: managed applications, mobile applications, and ordinary applications.
Whenever a code snippet calculates values of one or several local variables, we recommend that you preliminary initialize such variables. This way you can avoid potential execution time errors when a variable value is Undefined, and the code expects a particular vaue type. For example:
If Value Then
MyVariable = 0; // default value
... = MyVariable; // Using a variable value that is always numerical.
This recommendation applies to large blocks If/ElseIf/Else, in which it is difficult to control variable initialization.