list ʃlist_typeʅ list_name;
The
list statement creates a
list with the name
list_name. The list name must be unique and must contain only letters, numbers, or the underscore character. The name must begin with a letter. You can declare lists globally in
PROC GLOBAL or locally in functions or procedures.
Lists can be
numeric or
string. By default a list is numeric, but the type can be modified by specifying the
list_type.
The initial elements of a list can be set on definition by listing each value, separated by a comma. A list can also be initialized to the values of another list.
// numeric lists
list DaysPerMonthTypical = 31, 28, 31, 30, 31, 30,
31, 31, 30, 31, 30, 31;
list numeric DaysPerMonthLeapYears = DaysPerMonthTypical;
DaysPerMonthLeapYears(2) = 29;
// string lists
list string MonthNames = "Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec";