Free Pascal Lazarus Program Tutorial 18 - Arrays



Arrays hold lists of variables of the same data type. When there are large lists of variables and data, it is easier to contain the data in an array than have large amounts of separate variables to hold the data. Think of an array as a placeholder for piece of data.

The Array Syntax 
Name_Of_Array : array[range] of datatype;

If we wanted to create an array that will hold five human first names the syntax will look like this:

FirstName : array[1..5] of string;

Code Download
FPProgT18.zip