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 List objects globally in
PROC GLOBAL or locally in functions or procedures.
List objects 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.
The following variable modifiers apply to List objects:
- persistent: to persist the variable's value from one run of an application to another.
// numeric List objects
List DaysPerMonthTypical = 31, 28, 31, 30, 31, 30,
31, 31, 30, 31, 30, 31;
List numeric DaysPerMonthLeapYears = DaysPerMonthTypical;
DaysPerMonthLeapYears(2) = 29;
// string List
List string MonthNames = "Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec";