Arrays provide a convenient way to handle large sets of variable values of a particular type. Arrays are declared like other variables using the LOCAL or GLOBAL commands, but also require a size specifier in square brackets after the variable name. For example, an array of 3 integers called x can be declared with the command:
EASI>local integer x[3]
The number 3 in square brackets in the declaration statement sets the size of the array. The values in an array are manipulated in expressions and assignments using indexing. An index is a numeric value that is used to access a particular element of an array. The first element of an array is always accessed with the index 1, and the remaining values are accessed with the indices 2, 3, and so on up to the declared size of the array. Indices appear in square brackets following the array name. For example, to assign the value 5 to the first element of the array x:
EASI>x[1] = 5 EASI>x[2] = x[1] + 10 EASI>print x[1], x[2], x[3] 5 15 0
The maximum size of which an array may be declared is limited only by available memory. Arrays may only be declared for the basic types available in EASI (byte, char, integer, float, and double), and also for structures which will be described later. It is not currently possible to declare multi-dimensional arrays in EASI.
Arrays of characters may be handled in a simplified way in addition to being manipulated using the indexing technique described above. It is possible to assign a list of characters enclosed in double quotes, commonly referred to as a string, directly to the array. For example:
EASI>local char filename[8] EASI>filename = "irvine" EASI>print filename irvine
It is still possible to access individual elements of the character array using indexing:
EASI>print filename[3] v
If an assigned string is too large to fit within the size allocated for the array, the assigned string is truncated:
EASI>filename = "irvine.pix" EASI>print filename irvine.p
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.