A constant is a variable that never changes. It remains a static value for the entire
script execution. You cannot change the value of a constant, nor can you convert
an existing variable into a constant. Placing Const after Dim, Global or Local makes
the variable a constant. You can also declare a constant variable without explicit
declaration. The following example illustrates how to declare a constant variable
in each scenario:
Code:
Const $example = 0
Dim Const $example1 = 1
Global Const $example2 = 2
Local Const $example3 = 3
ArraysAn array is a matrix of data in which all the elements are of the same data type and
size. For example, an array of two numbers—“5” and “3”—is declared as follows:
Code:
$num[0] = "5"
$num[1] = "3"
Figure 1. Visual representation of Example 3. Two-Dimensional Array.
Arrays can also be multidimensional, with up to 64 dimensions. Example 3 shows a two-dimensional array.
This comment has been removed by the author.
ReplyDelete