InstallScript Lists

InstallShield 2020

Lists are used to store related information, such as strings or numbers. InstallScript lists are very similar to single-linked lists in the C language. InstallScript list functions are very flexible, enabling you to return information in an order different from the order in which it was stored and access and use that information in a variety of ways.

List Functions

InstallShield provides a number of functions for creating and manipulating lists. There are three types of InstallScript list functions:

Functions ending in -String that work with string lists only
Functions ending in -Item that work with number lists only
Functions that work with either string or number lists

InstallShield also has many secondary list-related functions that use or create lists.

List Structure

Lists are used to store related information—either strings or numbers. All the information in a list must be of the same data type, and the number of elements is limited only by the available memory.

An InstallScript list has two parts. The first part is the head, which InstallShield uses internally. The head of the list contains general information about the list, such as whether it contains strings or numbers. The head also contains pointers to the beginning and end of the list.

The second part of the list is the list body. The list body contains the actual strings or numbers. You can have as many strings or numbers in a list as the memory in the system will allow.

Remember that lists cannot contain both numbers and strings. A list must have only strings or only numbers.

Variables representing lists can be declared as type LIST or type LONG. Lists exist only in memory, meaning they are destroyed when the installation is complete. If a list is local to a function, the list is destroyed when the function returns control to the calling code.

See Also