ACL, Arbortext’s Command Language, it is similar to Perl which is the programming language I prefer. See Part 1, Part 2 and Part 3.
Arrays
Arrays are special variables with multiple “compartments”. Each compartment holds a value. Arrays consist of names and indexes. ACL has two types of one-dimensional arrays:
Normal arrays are indexed by integers subscripts.
Associative arrays are indexed by arbitrary strings or keys.
Declaring Arrays
Arrays can be defined as local or global. Define them like a variable, ($) name, square brackets, semicolon. Arrays can be set to a dimension such as having ten values, $array[10]. The square brackets [ ] are used to address or retrieve the elements of an array.
Accessing Array
Accessing the keys of an array, use the for loop, as in: for (key in array).
For example, the code below iterates over the two elements of the associative array color twice, once with Associative and once with Normal:
$color["red"] = "red";
$color["blue"] = "blue";
for ($hue in $color) {
response("the color is " . $color[$hue]);
}
unsetvar color; #– the color array undeclared
#– Normal Array
$color[1] = "red";
$color[2] = "blue";
for ($hue in $color) {
response($color[$hue]);
}


really great training session. The 4 parts were the introduction to variables, functions, arraays, local and global. It would be great if you can explain witt real time examples.
thanks. I have placed some examples online, such as “Removing Unused Graphics” and “Wiki Help Files”, but I agree with you that I need to do more.
d